Computer Science, asked by adarshchaubey8404, 9 months ago

Write a program in c++ to enter a number and print the factorial of a number by using do while loop.

Answers

Answered by gauravarduino
1

Explanation:

Working:

First the computer reads the number to find the factorial of the number from the user.

Then using do-while loop the value of 'i' is multiplied with the value of 'f'.

The loop continues till the value of 'i' is less than or equal to 'n'. Finally the factorial value of the given number is printed.

Similar questions