#include <stdio.h> int factorial(int a); int main() { int a =3; printf("the value of factorial is %d" , factorial(a)); //code return 0; } int factorial(int a){ if(a==0 || a==1){ return 1; }else{ return a * factorial(a-1); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter