#include<iostream.h>
void main()
{
int num,fact=1;
cout<<"Enter the number .\n";
cin>>num;
while(num>0)
{
fact=fact*num;
num--;
}
cout<<"The factoria of number is "<<fact<<" .\n";
}
void main()
{
int num,fact=1;
cout<<"Enter the number .\n";
cin>>num;
while(num>0)
{
fact=fact*num;
num--;
}
cout<<"The factoria of number is "<<fact<<" .\n";
}
No comments:
Post a Comment