Problem gcd
User Rndm123
Submission Time 2023-04-05 16:13:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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:9:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
9 | return a;
| ^
gcd.cpp:13:11: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
13 | return a;
| ^
gcd.cpp: In function ‘int main()’:
gcd.cpp:25:7: error: expected primary-expression before ‘int’
25 | cin>>int a>>int b;
| ^~~
gcd.cpp:26:12: error: ‘a’ was not declared in this scope
26 | cout<<gcd(a,b);
| ^
gcd.cpp:26:14: error: ‘b’ was not declared in this scope
26 | cout<<gcd(a,b);
| ^