Open chamz99 opened 2 years ago
using namespace std;
int main() { int i, n, factorial = 1;
cout<<"Enter a positive integer: ";
cin>>n;
for (i = 1; i <= n; ++i) {
factorial *= i; // factorial = factorial * i;
}
cout<< "Factorial of "<<n<<" = "<<factorial;
return 0;
}
@DharaniKarunarathna you can send PR
include
using namespace std;
int main() { int i, n, factorial = 1;
}