Prompt the user for input


Prompt the user for input as follows:
Input a non-negative integer:
Read in an integer value from the user.
If the input value is non-negative, the program gives a response of the form:
5 factorial equals 120.
where 5 is replaced by the actual input value and 120 is replaced by the calculated factorial value (be sure your code handles the case where 0 is input correctly).
If the input value is negative, the program should output
Negative values are not allowed

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Prompt the user for input
Reference No:- TGS097064

Expected delivery within 24 Hours