- 1
I cant understand if
4 Réponses
0
If you are dead you will respawn in the game.That it's!
+ 7
how can you not understand "if"?
if x equals 5 or y is less than 7 do some stuff, else do other stuff.
where's the difference to sentences like: if your shirt is black you're cool, else if your shirt is blue you should have a pizza, else take a nap.
+ 4
"If statements" checks Two Conditions
1) True .
2) False.
if your condition is true then your statements inside if satement will execute otherwise your else statement will execute.
Ex.
int a=1;
If (a==1)
{
cout<< "Hello";
}
else
{
cout<<"Bye";
}
Look at the above example, in the first statement a is assigned with a value 1 ,then we are checking the condition inside the brackets of if statement that is
" Is a is really 1?". since a is 1 ,so the statement inside if statement is executed that is Hello is given as output.If the if statement condition is wrong then you would get Bye as output.
Hope this info helps!!!
Keep coding!!
+ 2
I know now who dislike at me,LoL