Question: Write code, which will ask user to enter one decimal number and ask user about data type to use - char, int or long long.
Write code, which will ask user to enter one decimal number and ask user about data type to use - char, int or long long. Calculate and show to user value of factorial of entered number or inform user that correctly calculate value of factorial of entered number with selected data type is not possible. For calculation use while loop. Calculation should be stopped immediately as soon as in it will appear error (to not to waste time). Algorithm should not use constants of limits of data types, value of factorial shouldnt be compared with zero, verification of sign of value of factorial cannot be used, in calculations data type no other than user selected should be used. please only use C language.
please answer fast as you can.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
