Problem gcd
User Kavinkv
Submission Time 2025-02-20 21:28:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp: In function ‘int main()’:
gcd.cpp:4:2: error: ‘cin’ was not declared in this scope
4 | cin >> a >> b;
| ^~~
gcd.cpp:6:17: error: expected ‘)’ before ‘mod’
6 | ans = gcd(b, a mod b);
| ~ ^~~~
| )
gcd.cpp:6:9: error: ‘gcd’ was not declared in this scope
6 | ans = gcd(b, a mod b);
| ^~~
gcd.cpp:9:17: error: expected ‘)’ before ‘mod’
9 | ans = gcd(a, b mod a);
| ~ ^~~~
| )
gcd.cpp:9:9: error: ‘gcd’ was not declared in this scope
9 | ans = gcd(a, b mod a);
| ^~~
gcd.cpp:11:2: error: ‘cout’ was not declared in this scope
11 | cout << ans;
| ^~~~