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

What do paramecium eat
The total are of North Dakota is about 70,700 square miles. What is 70,700 written in expanded form?
4x+15y=13 3x+5y=16 solving systems by elimination
A hardcover book sells for $24 at the bookmart. Ben pays a total of $25.02 for the book. What is the sales tax rate?
How was the Lend-Lease program a significant departure from the policy of neutrality? It gave American convoys permission to attack any German ship that fires f
How to factorise 5a squared - 4ab
The hypotenuse of an isosceles right triangle is 16 centimeters. Find the length of the 2 other sides of the triangle to the nearest tenth.
is leather ,wood,and water examples of insulators
how successful were stone keeps in defending those inside?
16. Put the words in order to make the correct sentence. 1) a tall, clean-shaven 2) came in 3) man with a firm, 4) the door opened and 5) serious expressio