0

How to use "if"

2nd May 2017, 7:38 PM
Даниил U.-SasH
Даниил U.-SasH - avatar
2 odpowiedzi
+ 3
You use "if" to check a condition, if this condition is true, the code inside the wavy brackets will be triggered, if it is false it just skips it. You can also use "else" to execute another block of code if the condition is false. Example: if (6>10) { cout << "True"; }else{ cout << "False"; } Outputs: False
2nd May 2017, 8:08 PM
Joel C.
Joel C. - avatar
+ 2
if(condition) { DoSomething(); }
2nd May 2017, 7:42 PM
Drauchris
Drauchris - avatar