Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
10
Task/Factorial/Asymptote/factorial.asymptote
Normal file
10
Task/Factorial/Asymptote/factorial.asymptote
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
real factorial(int n) {
|
||||
real f = 1;
|
||||
for (int i = 2; i <= n; ++i)
|
||||
f = f * i;
|
||||
return f;
|
||||
}
|
||||
|
||||
write("The factorials for the first 5 positive integers are:");
|
||||
for (int j = 1; j <= 5; ++j)
|
||||
write(string(j) + "! = " + string(factorial(j)));
|
||||
Loading…
Add table
Add a link
Reference in a new issue