void main()
{
int fact;
int ans=1;
cout<<"Enter the number whose factorial is to be found";
cin>>fact;
if(fact<0){cout<<"No. should be greater than 0"; break;}
if(i==0){cout<<"Factorial=0";break;}
for(int i=1;i<=fact;i++)
{
ans=ans*(i);
}
cout<<"Factorial="<<ans;
}
--
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.