Problem gcd
User IGJH
Submission Time 2024-02-27 08:43:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gcd.cpp: In function ‘int main()’:
gcd.cpp:5:23: error: ‘b’ was not declared in this scope
5 | for ( int i = 0; i < b; i++){
| ^
gcd.cpp:6:8: error: ‘a’ was not declared in this scope
6 | if( a%i == 0 and b%i == 0){
| ^
gcd.cpp:7:11: error: overloaded function with no contextual type information
7 | gcd = i;
| ^
gcd.cpp:10:6: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘<unresolved overloaded function type>’)
10 | cout<< gcd;
| ~~~~^~~~~~
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from gcd.cpp:1:
/us