chanelharris7282 chanelharris7282
  • 08-10-2021
  • Computers and Technology
contestada

5.Write a program that calculates the factorial of a given number (for example, factorial of 5 = 120).

Respuesta :

Аноним Аноним
  • 08-10-2021

Answer:

Using c++ syntax

int givenNumber= 5; //can set to something else

int answer = 1;

for (int i = 1; i <= givenNumber; i++){

   answer *= i;

}

Answer Link

Otras preguntas

An important component of a realistic mindset includes understanding that you
Find the approximate value of the circumference of a circle with the given radius. Use = 3.14. Round your answer to the nearest hundredth. 5.1 cm how do you now
Which is not a role of the Federal Reserve? a. Banker and agent for the U.S. government b. Regulating the money supply c. Check clearing, supervising practic
Which law states that the volume and absolute temperature of a fixed quantity of gas are directly proportional under constant pressure conditions?
A stack of books is sitting on a table. Which force is pulling downward on it?
__________ capitalize the first and last words of a title. a. Always b. Never c. Sometimes d. Depending on the words,
(MC)What was the main goal of the Jim Crow laws passed in the South after the end of Reconstruction?
If your change a few words from the original text, you are not plagiarizing
What are the next letters in the sequence CD, HI, MN, RS
What is the value of log 43? Use the calculator. Round your answer to the nearest tenth.