[ad_1]
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
C++ Tutorial – 19 – The if else if else Statement
by
Tags:
Comments
33 responses to “C++ Tutorial – 19 – The if else if else Statement”
-
Thanks
-
Why can't you just use cascading if statements instead of 'else if'? What separates 'else if' from 'if'?
-
you were 21.
-
can you use an if statement with an char? for example: if(name ==bucky) {cout << "correct" << endl; } else if(name != bucky) { cout << "sorry dude" << endl;} this doesnt work
-
why if i include the do-while function,the program keeps on runnin? like
too high
too high
too high
too high…. and its infinite.. -
Thank you, so simple explained. Nice 🙂
-
This video might be uploaded 6 years ago but you helped me a lot for school.
Thanks! if you're still around that is. -
I am Turbo C++ user so compiler varies :v :3
-
I get an elseif not declared in scope. What does that mean, and how do I fix it?
-
how can i use this to make a random number guess. there was a previous program to do this but the so called 'random' number is allways the same! xD
-
because it's easier to say "Do this if all my conditions have failed".
Or ex: if (condition1 == true) { runThis(); } else { cout << "I'm running this for all other conditions" << endl; } -
If(answer >=1 && answer <=500)
-
if(answer <= 500)
I think, I'm not too sure, give it a try 🙂
-
can i put a computation in the if else statement after the cout????is that possible?
-
Thanks Bucky, but what if I want a range of correct answers such as 1-500?
-
I feel like I'm so 2000 and late 🙁 lol.
-
Um didn't you say that you are 23 in a couple previous videos??? or were these not made in order. Idk im watching this 5 years later and it really doesn't matter.
-
you need a cin line where the person can answer your question on whether or not they like bacon. Also it won't work b/c you declared that answer is "int" in line one which is an integer and "y" and "n" are not integers so your code will break
-
When i type in ''else'' it say's '';'' expected before ''else''
I put '';'' and it still say's the same thing,please help T.T -
int answer
cout << "Do you like bacon? (y or n)" << endl
if (answer == y)
cout << "You're cool, bro." << endl
else
cout << "You suck." << endl
system("pause")
return 0 -
print "Why does everyone keep using coding languages?", "Oh crap! I'm using Python D:"
-
u explain better than my instructor.. i actually learned something.. thanks dude! ur awesome!
-
You are right, it actually didn't work for me when I combined them. Only when I changed it to execute the loop around the if's, without the 'do'.
-Cheers
-
will the while condition executes till it is true or false? for example here it is executing till it gets false (answer!=21)
-
thats the devils no.
-
"66..or 66… nah we don't want that" hahaha made me laugh 😀
-
Thank you so much! I have a test tomorrow and these videos are helping me out so much review wise.
-
hey bucky i thought you said your 23 then your telling us your 21 haha just kidding bro! your great! nice job bucky the grappler
-
cout<<"Silly You :P";
-
someone forget to put a question mark … haha
-
noooo… gays work…its Mexicans that don't do shit
-
curly braces? (or whatever they're called)
-
@JerianMLG
I think you're missing a semicolon somewhere. If you can't solve the problem yourself, I could try to solve it if you send the code for me with a private message.
Leave a Reply