0
Can you guys help me find my error
(i will link the code in the comments) I know this can be done with switch statement but im out of practice with if statements in cpp.
6 Answers
+ 6
I also noticed on line 15 you have an extra
cout << as seen below:
----
cout<< cout<<"You picked....Slushies"<<endl;
----
It should be:
----
cout<<"You picked....Slushies"<<endl;
----
+ 6
Nothing to be embarrassed about. You'll develop an eye for this over time.
Glad we could help. đđ
+ 5
Your if statements should refer to the variable `x` instead of `int`:
It should be:
if(x == 1) {...}
Instead of:
if(int == 1){...}
+ 3
I could be wrong, but it looks like else if statements are not supported, only if statements and else statements are. Nest them to complete your code
Edit: Thank God for David Carroll, how did I miss that? đ Also, it looks like else if statements do work. Well, I tried. đ
+ 1
Peter C... David Carroll thanks you both for your input. I fixed the rather embarrassing mistakes in my code lol. Changing int to x and removing the extra cout seems to have it running properly.