+ 1
To find the factorial of a number using for loop
go
5 Answers
+ 11
In what language?
+ 3
python:
Res=1
for i in range(2,int(input()+1):
Res*=i
print(Res)
+ 3
C++:
int res;
cin>>int a;
for (int m=2;m<=a;m++){res*=m;}
cout<<res;
+ 2
Admittedly, I don't think this is counted as a for loop, but...
https://code.sololearn.com/csN157fHrwIU/?ref=app
#Python