TO
Find The Factorial Of Any Number;
#include<iostream.h>#include<conio.h>void
main(){int
n,num,factorial=1;cout<<"enter
number to find its factorial";cin>>num;for(n=1;n<=num;n++){factorial=factorial*n;}cout<<”factorial
of given number” “="<<factorial<<endl;getch();}
No comments:
Post a Comment