i started using c++ a few weeks ago , and i was told to build a program the finds the factorial of a number ...
#include <iostream>
using namespace std;
void main()
{
int x,fact;
cout<<"Enter the number wanted";
cin>>x;
for (fact=1; fact<=x ; fact++);
{
fact = fact * x;
cout<<"The Factorial ="<<fact<<endl;
cout<<endl;
}
}
i dont know what the problem is though