+ 2
Factorial of number
2 ответов
+ 15
with recursion , here is 1-liner
fact (n) { return n==0?1:n*fact(n-1); }
without recusion ,
int fact =1 ;
for ( ;n>1;n--) fact*=n;
System.out.println(fact);
+ 14
here it is described well
https://www.sololearn.com/learn/CPlusPlus/1641/?ref=app
if you found any problem to understand this you can comment again I'll help you