C program to find factorial of a number taking input from user.
#include <iostream>
using namespace std;
int main() {
int n,f,i,ans;
cout<<"Enter Number : ";
cin>>n;
f=n;
for(i=1;i<n;i++)
{
f=f*i;
}
cout<<"Factorial is : "<<f;
return 0;
}
Hello, I'm Arjunji, Currently I'm Pursuing MCA. I like to learn something new in my free time and thinking about innovative ideas.
I believe in myself and have a positive attitude towards work which I pursue everyday.
Looking forward to learn new things every single day.
Read More
No comments:
Post a Comment