Problem | gcd |
---|---|
User | Rndm123 |
Submission Time | 2023-04-05 16:13:30 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
gcd.cpp: In function ‘void gcd(int, int)’:
gcd.cpp:6:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
6 | return b;
| ^
gcd.cpp:7:2: error: expected ‘}’ before ‘else’
7 | else if (b==0){
| ^~~~
gcd.cpp:5:11: note: to match this ‘{’
5 | if (a==0){
| ^
gcd.cpp:8:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
8 | return a;
| ^
gcd.cpp:9:2: error: expected ‘}’ before ‘else’
9 | else{
| ^~~~
gcd.cpp:7:16: note: to match this ‘{’
7 | else if (b==0){
| ^
gcd.cpp:11:11: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
11 | return a;
| ^
gcd.cpp:12:3: error: expected ‘}’ before ‘else’
12 | else if (a > b){
| ^~~~
gcd.cpp:10:12: note: to match this ‘{’
10 | i