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

PLEASE HELP ENGLISH QUESTION In the poem "I Wandered Lonely as a Cloud," which of the following is an example of personification? I wandered Beside the lake, b
What does the Golden daffodil represent in the poem?
What is the mass % of carbon in dimethylsulfoxide (C2H6SO) rounded to three significant figures? A) 7.74 B) 78.1 C) 25.4 D) 30.7 E) 28.6
How do you start elimination with 3 variables?
Most of the best agricultural soils in the United States are found in areas that were formerly a. taiga forest. b. tundra. c. tropical rain forest. d. temperate
What do the Golden bells convey?
Before the trip, Tyler read 24 pages of his Philadelphia guidebook in an hour. The guidebook is 84 pages long. If he continued to read it at the same rate, how
A forecast with a time horizon of about 3 months to 3 years is typically called a: A)short-range forecast. B)medium-range forecast. C)long-range forecast D)weat
Which is the constant of variation, k, if y=kx, and y=3 when x=4? 3/4 4/3 3 4
Beth deposits $200,000 into her personal savings account. How much of her deposit is insured by the FDIC? $50,000 $150,000 $200,000