+ 1

nested if statemnet

what exactly is the difference between nested if and an and operator ? i can use multiple and operators then why nested if?

1st Aug 2017, 9:22 AM
Kashif Ali
Kashif Ali - avatar
6 odpowiedzi
+ 3
yes only if if(condition){ if(condition){ instruction; } }
1st Aug 2017, 12:06 PM
Umbe
Umbe - avatar
+ 3
You are right
1st Aug 2017, 12:15 PM
Umbe
Umbe - avatar
+ 2
i'm on c++ but i think you can get the answer by looking at this piece of code, anyway it is a very good question for me. if(condition){ if(condition){ instruction; } instruction; }
1st Aug 2017, 9:37 AM
Umbe
Umbe - avatar
0
don't u think I can use and (&) operator instead of multiple if's
1st Aug 2017, 12:00 PM
Kashif Ali
Kashif Ali - avatar
0
thanks😊 but I think and operator can handle only 2 conditions if (cond1 and cond2) { statements }
1st Aug 2017, 12:09 PM
Kashif Ali
Kashif Ali - avatar
0
bro text me text me i want help 03035745273
13th Aug 2017, 1:44 AM
Aamir Shehzad
Aamir Shehzad - avatar