Problem gcd
User 2Princes1Lance
Submission Time 2023-11-23 10:40:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp:7:3: error: expected unqualified-id before ‘if’
7 | if (prime%2 == 0 && prime > 2){
| ^~
gcd.cpp:10:3: error: expected unqualified-id before ‘if’
10 | if (prime%3 == 0 && prime > 3){
| ^~
gcd.cpp:13:3: error: expected unqualified-id before ‘if’
13 | if (prime%5 == 0 && prime > 5){
| ^~
gcd.cpp:16:3: error: expected unqualified-id before ‘if’
16 | if (prime%7 == 0 && prime > 7){
| ^~
gcd.cpp:19:3: error: expected unqualified-id before ‘if’
19 | if (prime%11 == 0 && prime > 11){
| ^~
gcd.cpp:22:3: error: expected unqualified-id before ‘else’
22 | else if (a%prime == 0 && b%prime == 0){
| ^~~~
gcd.cpp:27:3: error: expected unqualified-id before ‘else’
27 | else{
| ^~~~
gcd.cpp:30:2: error: expected declaration before ‘}’ token
30 | }
| ^
gcd.cpp:31:2: error: ‘cout’ does not name a type
31