If statements
Can you include an if statement inside an else if statement?
THANKS
1 2 3 4 5 6 7 8 9 10 11
|
if(something)
{
go();
}
else if(someone)
{
if(anyone)
{
sayYesYouCan();
}
}
|
LB are you positive? It will count for my grade thanks
LB is right don't worry (just in case you needed a second opinion). You could always run something like this and see it for yourself.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
int x;
cin >> x;
if(x < 5)
{
}
else if(x >= 5)
{
//Do something
if(x > 10)
{
//Do something else
}
}
|
Alright, thanks everyone for your help, I appreciate it!
Topic archived. No new replies allowed.