foo.cc: In function 'int main()':
foo.cc:4:13: warning: comparison of constant '100' with boolean expression is always true [-Wbool-compare]
4 | int x(1<x<100);
| ~~~^~~~
foo.cc:4:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
4 | int x(1<x<100);
| ~^~
foo.cc:5:12: error: expected '(' before 'x'
5 | if x % 2 !=0;
| ^
| (
foo.cc:6:19: error: unable to find numeric literal operator 'operator""x'
6 | { cout<<x=3x+1;
| ^~
foo.cc:6:19: note: use '-fext-numeric-literals' to enable more built-in suffixes
foo.cc:8:5: error: 'else' without a previous 'if'
8 | else
| ^~~~
foo.cc:9:21: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'int')
9 | { cout<<x=x/2;
| ^
In file included from iostream:39:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ostream:402:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
402 | operator=(basic_ostream&& __rhs)
| ^~~~~~~~
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ostream:402:33: note: no known conversion for argument 1 from 'int' to 'std::basic_ostream<char>&&'
402 | operator=(basic_ostream&& __rhs)
| ~~~~~~~~~~~~~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务