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

Jacyln thinks that -1/2 is greater than 1/4 because it is father from zero on the number line. Is her thinking correct? Explain
Express 4/5 as a percent. Make sure to label your answer with %.
What does the word measures in the third paragraph mean
The interest that cindy earns on her investment is given by the equation /=42t where t is the time in years that her money is invested. she makes a table to det
A certain first-order reaction has a rate constant of 2.75 10-2 s−1 at 20.°c. what is the value of k at 45°c if ea = 75.5 kj/mol? webassign will check your answ
According to the second law of thermodynamics, which is a requirement for thermal energy to flow from colder objects to hotter objects? Thermal expansion must
the ? did little as an organization to prevent conflict because it did not have enough bite to its bark
25 Points!!! Will give Brainliest!!! Help please!!
Simplify the expression: 4(-4 + 2z)=
PLEASEEEE HELPPPPP!!! IM SO FAR BEHIND DUE TO FAMILY MATTERS AND AM STRUGGLIN WITH THIS QUESTION!!! Compare and contrast the lyric poetry of the Anglo-Saxon