1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
 
using namespace std;
 
int main() {
 
    int num = 1;
 
    for (int i = 1; i <= 10; i++) {
        for (int j = i; j > 1; j--) {
            num *= j;
        }
        cout << i << "! = " << num << endl;
        num = 1;
    }
}
cs


+ Recent posts