RosettaCodeData/Task/Factorial/Processing/factorial

8 lines
78 B
Text
Raw Permalink Normal View History

2018-06-22 20:57:24 +00:00
int fact(int n){
if(n <= 1){
return 1;
} else{
return n*fact(n-1);
}
}