wap to print the factorial of all the no from 1 to N
Answers
Answered by
1
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,a,f=1;
cout<<"enter the number \n";
cin>>a;
for(i=a;i>=1;i--)
{
f=f*i;
}
cout<<"factorial of the number is"<<f;
getch();
}
Similar questions