Tuesday, 19 August 2014

Factorial off a number using do-while-loop

#include
#include
void main(){int n,f=1;clrscr();printf("enter any number=");scanf("%d",&n);do{f=f*n;n--;}while(n>0);printf("factorial number is=%d",f);getch();}

No comments:

Post a Comment