- #1
Rhine720
- 88
- 0
So, in my C++ book it says only a single statement can be used in an if-else like
if (blah==blahblah)
cout<<blahblahblah
else
cout<<blah he ha
unless you do
if (blah==blahblah)
{
cout<<blahblahblah
cout<<also blah
}
else
{
cout<<blah he ha
cout<<blah le ha ha
}
But why can't i do
if (blah==blahblah)
{
cout<<blahblahblah
}
else
{
cout<<blah he ha
}
..or can i?
if (blah==blahblah)
cout<<blahblahblah
else
cout<<blah he ha
unless you do
if (blah==blahblah)
{
cout<<blahblahblah
cout<<also blah
}
else
{
cout<<blah he ha
cout<<blah le ha ha
}
But why can't i do
if (blah==blahblah)
{
cout<<blahblahblah
}
else
{
cout<<blah he ha
}
..or can i?