Problem gcd
User AaravRastogi
Submission Time 2025-12-03 10:52:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp: In function ‘int main()’:
gcd.cpp:10:10: error: ‘__gcd’ was not declared in this scope; did you mean ‘std::__detail::__gcd’?
10 | int g = __gcd(a, b);
| ^~~~~
| std::__detail::__gcd
In file included from gcd.cpp:3:
/usr/include/c++/9/numeric:103:5: note: ‘std::__detail::__gcd’ declared here
103 | __gcd(_Tp __m, _Tp __n)
| ^~~~~
gcd.cpp:12:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘<unresolved overloaded function type>’)
12 | cout << gcd;
| ~~~~~^~~~~~
In file included from /usr/include/c++/9/iostream:39,
from gcd.cpp:1:
/usr/include/c++/9/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<