7 lines
78 B
Text
7 lines
78 B
Text
int fact(int n){
|
|
if(n <= 1){
|
|
return 1;
|
|
} else{
|
|
return n*fact(n-1);
|
|
}
|
|
}
|