12.6k views
5 votes
Program C++ I need help!

Program C++ I need help!-example-1

1 Answer

6 votes

Answer:#include <iostream>

using namespace std;

int main()

{

int factorial = 1;

for (int i = 5; i > 0; i--) {

factorial = factorial * i;

}

cout<<factorial;

return 0;

}

Step-by-step explanation:

User Hanka
by
4.3k points