InterviewSolution
#include<stdio.h>void main(){int n, i, fact = 1;printf (“Enter the value for n”);scanf (“%d”, &n);for (i = 1; i <= n; i++){fact = fact * i;}printf (“factorial of %d is %d”, n, fact);}
Your experience on this site will be improved by allowing cookies. Read Cookie Policy