0
What did I do wrong?
#include <iostream> using namespace std; int main() { int a; int b; cin>>"a">>"b"; if{a>b}<<cout<<"you lose" return 0; }
2 Answers
+ 6
Why do you wanna store the values in a string?? Store them in a variable.
Hence:
cin>>a>>b;, not cin>>"a">>"b;
And:
if (a>b){cout<<"you lose";}
not
if {a>b}<<cout<<"you lose";
That's how if-statements work
0
thank you! sorry I'm a novice and just wanted to try new things I learned.