- 3

Teach the if statements

if

2nd Sep 2017, 9:55 AM
Edwin Kiplangat
4 Antworten
+ 9
if (condition ){ statements; } else{ statements; }
2nd Sep 2017, 9:59 AM
P R
P R - avatar
+ 8
//checking the max no out of 2 int a=2,b=4; if (a>b){ cout<<"max is :"<<a; } else{ cout<<"max is:"<<b; } output: max is: 4
2nd Sep 2017, 10:03 AM
P R
P R - avatar
+ 1
its about conditions String condition = "true"; if(condition.equalsIgnoreCase("true");{System.out.println("Condition is true"); } else {System.out.println("Condition is false");
2nd Sep 2017, 11:41 AM
D_Stark
D_Stark - avatar
- 1
please elaborate ,
2nd Sep 2017, 10:00 AM
Edwin Kiplangat