C++ program to find factorial of a positive integer entered by user. Test Case 1 Input (stdin) 5 Expected Output 120 Test Case 2 Input (stdin) 6 Expected Output 720
#include <iostream> using namespace std; int main() { int n,i,pro=1; cin>>n; for(i=1;i<=n;i++) pro=pro*i; cout<<pro; return 0; }