+ 1
What's wrong?
I'm trying to make a condition (with if and else if) and there is an error that says I can't use else if because I don't have if. Can someone explain me what's wrong?
36 Respostas
+ 5
men don't put ; after if condition and if else
+ 9
Your welcome
+ 8
Easy fix, delete the "elseif" and nest with another "if".
this compiles.
https://code.sololearn.com/cN5FwcNTg5OV/?ref=app
+ 7
I recommend uploading you program, so someone can help you with it.
When you make a comment tap insert and select the code you want.
+ 3
no prob
+ 3
im new too men, but hell yeah i love it...
+ 2
give us the code
+ 2
Thanks both of you.
+ 2
I'm planning to study programming and I thought to start learn more about it before going to university. I'm new into that.
+ 2
yeah but you are in a context of ages, normally it can't take negatives in real life...😂😉
+ 2
yeaaah men, im really happy...😀😀😀😉
+ 1
Can I ask something else?
+ 1
sure?
+ 1
ask...
+ 1
what do you mean with satisfied?
+ 1
if (x < 0) and x in this situation is -3
+ 1
your x can't take a negative...
but i don't think that i understood your question pretty good....😂😂
+ 1
wait a little bit, im looking now, actually im a noob in C++ soo just a second...😉
+ 1
it should be something like this...
if(ya<0 || apa<0){
alert( you can't take a negative value)};
return 0;
but i don't know how to write this in C++