Wednesday 3 May 2017

factorial c++ programming

#include <iostream>
using namespace std;
int main()
{
int fact=1, i;
cout << "emter the number";
cin >> i;
for (int count = 1; count <=i; count++)
{
fact = fact*count;

}
cout << fact;
return 0;
}

No comments:

Post a Comment