Problem | gcd |
---|---|
User | Rndm123 |
Submission Time | 2023-04-05 16:15:13 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
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:28:6: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘void’)
28 | cout<<gcd(a,b);
| ~~~~^~~~~~~~~~
| | |
| | void
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,