Some guys commented that they had problems compiling it in other posts of the c series.Therefore, I will recommend an online compiler.

https://www.onlinegdb.com/online_c_compiler

Let the compile fact code

#include<stdio.h>
int fact(int a){
	int b;
	if(a==1){
		return 1;
	}
	else{
		b=fact(a-1)*a;
		return b;
	}	
}
int main(){
	int a,b;
	printf("what the number?");
	scanf("%d",&a);
	b=fact(a);
	printf("%d",b);
}

Leave a Reply

Your email address will not be published. Required fields are marked *