#include<stdio.h> int factorial(int num){ int fac=1; for(int i=1;i<=num;i++){ fac=fac*i; } printf("%d",fac); } int main(){ int num=5; factorial(num); }
To embed this project on your website, copy the following code and paste it into your website's HTML: