Saturday, August 9, 2014

Factorial program of a number

Simple C program to find factorial of a number. If you need help please feel free to ask

#include <stdio.h> main() {int fact,n; printf("enter a number\n"); scanf("%d",&n); for(fact=1;n>0;n--) fact=fact*n; printf("factorial of the number is %d\n",fact); }

No comments:

Post a Comment