Problem | factorial |
---|---|
User | Orson |
Submission Time | 2025-09-14 09:33:58 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
factorial.cpp:2:5: error: cannot declare ‘::main’ to be a global variable
2 | int main{
| ^~~~
factorial.cpp:3:2: error: expected primary-expression before ‘int’
3 | int n;
| ^~~
factorial.cpp:3:2: error: expected ‘}’ before ‘int’
factorial.cpp:2:9: note: to match this ‘{’
2 | int main{
| ^
factorial.cpp:6:2: error: ‘cin’ does not name a type; did you mean ‘sin’?
6 | cin >> n;
| ^~~
| sin
factorial.cpp:7:2: error: expected unqualified-id before ‘for’
7 | for (i = 0; i < n; i++) {
| ^~~
factorial.cpp:7:14: error: ‘i’ does not name a type
7 | for (i = 0; i < n; i++) {
| ^
factorial.cpp:7:21: error: ‘i’ does not name a type
7 | for (i = 0; i < n; i++) {
| ^