foo.cc: In function ‘int main()’:
foo.cc:6:26: error: expected ‘;’ before ‘int’
6 | std::cin>>a>>b>>c
| ^
| ;
7 | int max=a;
| ~~~
foo.cc:9:15: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
9 | if (b>max){
| ^~~
| std::max
In file included from /nix/gcc-13.3.0/include/c++/13.3.0/string:51,
from /nix/gcc-13.3.0/include/c++/13.3.0/bits/locale_classes.h:40,
from /nix/gcc-13.3.0/include/c++/13.3.0/bits/ios_base.h:41,
from /nix/gcc-13.3.0/include/c++/13.3.0/ios:44,
from /nix/gcc-13.3.0/include/c++/13.3.0/ostream:40,
from iostream:41:
/nix/gcc-13.3.0/include/c++/13.3.0/bits/stl_algobase.h:303:5: note: ‘std::max’ declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
foo.cc:12:15: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
12 | if (c>max){
| ^~~
| std::max
/nix/gcc-13.3.0/include/c++/13.3.0/bits/stl_algobase.h:303:5: note: ‘std::max’ declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
foo.cc:15:25: error: ‘c)’ was not declared in this scope
15 | if ((a<=b && a>=c)|| (a>=b && a<=c)){
| ^~~
foo.cc:15:46: error: expected ‘)’ before ‘{’ token
15 | if ((a<=b && a>=c)|| (a>=b && a<=c)){
| ~ ^
| )
foo.cc:23:26: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
23 | std::cout<<mid<<" "<<max<<std::endl;
| ^~~
| std::max
/nix/gcc-13.3.0/include/c++/13.3.0/bits/stl_algobase.h:303:5: note: ‘std::max’ declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
foo.cc:25:2: error: expected ‘}’ at end of input
25 | }
| ^
foo.cc:4:1: note: to match this ‘{’
4 | {
| ^