Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
11
Task/Integer-sequence/C++/integer-sequence-1.cpp
Normal file
11
Task/Integer-sequence/C++/integer-sequence-1.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
||||
int main()
|
||||
{
|
||||
auto i = std::uintmax_t{};
|
||||
|
||||
while (i < std::numeric_limits<decltype(i)>::max())
|
||||
std::cout << ++i << '\n';
|
||||
}
|
||||
19
Task/Integer-sequence/C++/integer-sequence-2.cpp
Normal file
19
Task/Integer-sequence/C++/integer-sequence-2.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Using the proposed unbounded integer library
|
||||
|
||||
#include <iostream>
|
||||
#include <seminumeric>
|
||||
|
||||
int main()
|
||||
{
|
||||
try
|
||||
{
|
||||
auto i = std::experimental::seminumeric::integer{};
|
||||
|
||||
while (true)
|
||||
std::cout << ++i << '\n';
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#include <iostream>
|
||||
#include <cstdint>
|
||||
|
||||
int main()
|
||||
{
|
||||
uint32_t i = 0;
|
||||
while(true)
|
||||
std::cout << ++i << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
1
Task/Integer-sequence/NewLISP/integer-sequence.newlisp
Normal file
1
Task/Integer-sequence/NewLISP/integer-sequence.newlisp
Normal file
|
|
@ -0,0 +1 @@
|
|||
(while (println (++ i)))
|
||||
27
Task/Integer-sequence/Oberon-2/integer-sequence.oberon-2
Normal file
27
Task/Integer-sequence/Oberon-2/integer-sequence.oberon-2
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
MODULE IntegerSeq;
|
||||
IMPORT
|
||||
Out,
|
||||
Object:BigInt;
|
||||
|
||||
PROCEDURE IntegerSequence*;
|
||||
VAR
|
||||
i: LONGINT;
|
||||
BEGIN
|
||||
FOR i := 0 TO MAX(LONGINT) DO
|
||||
Out.LongInt(i,0);Out.String(", ")
|
||||
END;
|
||||
Out.Ln
|
||||
END IntegerSequence;
|
||||
|
||||
PROCEDURE BigIntSequence*;
|
||||
VAR
|
||||
i: BigInt.BigInt;
|
||||
BEGIN
|
||||
i := BigInt.zero;
|
||||
LOOP
|
||||
Out.Object(i.ToString() + ", ");
|
||||
i := i.Add(BigInt.one);
|
||||
END
|
||||
END BigIntSequence;
|
||||
|
||||
END IntegerSeq.
|
||||
2
Task/Integer-sequence/Perl/integer-sequence-2.pl
Normal file
2
Task/Integer-sequence/Perl/integer-sequence-2.pl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
use bigint;
|
||||
my $i = 0; print ++$i, "\n" while 1;
|
||||
5
Task/Integer-sequence/R/integer-sequence.r
Normal file
5
Task/Integer-sequence/R/integer-sequence.r
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
z <- 0
|
||||
repeat {
|
||||
print(z)
|
||||
z <- z + 1
|
||||
}
|
||||
|
|
@ -9,15 +9,15 @@
|
|||
│ where it started, and this computer program will still be counting.│
|
||||
│ │
|
||||
│ │
|
||||
│ According to Sir Author Eddington in 1938 at his Tamer Lecture at │
|
||||
│ Trinity Collecge (Cambridge), he postulated that there are exactly │
|
||||
│ According to Sir Arthur Eddington in 1938 at his Tamer Lecture at │
|
||||
│ Trinity College (Cambridge), he postulated that there are exactly │
|
||||
│ │
|
||||
│ 136 ∙ 2^245 │
|
||||
│ 136 ∙ 2^256 │
|
||||
│ │
|
||||
│ protons in the universe and the same number of electrons, which is │
|
||||
│ equal to around 1.57477e+79. │
|
||||
│ │
|
||||
│ Although, a modern extimate is around 10^80. │
|
||||
│ Although, a modern estimate is around 10^80. │
|
||||
│ │
|
||||
│ │
|
||||
│ One estimate of the age of the universe is 13.7 billion years, │
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
i = 0
|
||||
puts(i += 1) while true
|
||||
1.step{|n| puts n}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue