Problem gcd
User JcYong
Submission Time 2024-06-20 13:57:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp:3:9: error: ‘a’ was not declared in this scope
3 | int gcd(a,b){
| ^
gcd.cpp:3:11: error: ‘b’ was not declared in this scope
3 | int gcd(a,b){
| ^
gcd.cpp:3:12: error: expression list treated as compound expression in initializer [-fpermissive]
3 | int gcd(a,b){
| ^
gcd.cpp: In function ‘int main()’:
gcd.cpp:13:9: error: ‘a’ was not declared in this scope
13 | cin >> a >> b;
| ^
gcd.cpp:13:14: error: ‘b’ was not declared in this scope
13 | cin >> a >> b;
| ^
gcd.cpp:14:10: error: reference to ‘gcd’ is ambiguous
14 | cout << gcd(a,b);
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:84,
from gcd.cpp:1:
/usr/include/c++/9/numeric:132:5: note: candidates are: ‘template<class _Mn, class _Nn> constexpr std::common_type_t<