На Python:
fact = 1;
print("Enter N number:")
N = int(input());
for i in range(1, N + 1):
fact *= i;
print("Answer is: ", fact);
Удачи)
#pascalabc.net
begin
var n := ReadInteger();
Range(1, n).Aggregate(biginteger.One, (p, q) -> p * q).Println;
end.
#python 3.7.2
N = int(input())
prod = 1
for i in range(N+1):
prod *= i
print(prod)
Объяснение:
На Python:
fact = 1;
print("Enter N number:")
N = int(input());
for i in range(1, N + 1):
fact *= i;
print("Answer is: ", fact);
Удачи)
#pascalabc.net
begin
var n := ReadInteger();
Range(1, n).Aggregate(biginteger.One, (p, q) -> p * q).Println;
end.
#python 3.7.2
N = int(input())
prod = 1
for i in range(N+1):
prod *= i
print(prod)
Объяснение: