0

can i make a if else statment?

8th Oct 2016, 2:50 PM
Sliem Beji
Sliem Beji - avatar
6 ответов
+ 5
No you cant place 2"if" with codes for both of them individually one below the other. But what you can do : if (Requirement) { Code for failing requirement1 } else { if (Requirement2) { Code for failing requirement2 } Code for passing both }; OR Check part3 of this lesson.
27th Oct 2016, 8:25 AM
Wen Qin
Wen Qin - avatar
+ 1
Yes If (expression) { code } else { code }
8th Oct 2016, 9:04 PM
Ivan G
Ivan G - avatar
+ 1
no i mean if () if else() else()
8th Oct 2016, 9:07 PM
Sliem Beji
Sliem Beji - avatar
+ 1
May be: if (expression) { code } else if (expression) { code } else { code } Basically you just replace else-code by another if statement.
8th Oct 2016, 9:22 PM
Ivan G
Ivan G - avatar
+ 1
thx
8th Oct 2016, 9:22 PM
Sliem Beji
Sliem Beji - avatar
0
why not :)
9th Oct 2016, 12:18 AM
AB Sattar Solangi
AB Sattar Solangi - avatar