This C++ program finds the factorial of a user-input number. The user enters a number, then the program uses a for loop to multiply all integers from 1 to the input number, storing the running product in a variable f. Finally, it displays the factorial of the input number on the screen.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
30 views2 pages
Program 1
This C++ program finds the factorial of a user-input number. The user enters a number, then the program uses a for loop to multiply all integers from 1 to the input number, storing the running product in a variable f. Finally, it displays the factorial of the input number on the screen.