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’s these country’s for Africa
¿Cuál de las siguientes causas de la degradación del paisaje se menciona en la charla?
For the equation f(x)=1.9(0.41)*, state the initial value C, the growth or decay factor a, and percent change R for each unit increase in x. C=(Type an integer
find x y=\frac{1}{4} x+3
Any help is appreciated thanks
Television journalist barbara walters died on december 30. What was her first job in broadcasting?
How did Susan B. Anthony encourage change for women's rights?
Calculate the sector area: 16 in 90°​
d. -(y² - 2) = y²-5-2y², solve for y
The function f is defined by f(x) = sqrt 25 - x2 for -5\leq x\leq 5. a) Determine the average rate of change of f over the interval --4\leq x\leq 3 b) Find f (p