if else block
If test condition is true, statements inside the body of if block will be executed otherwise statements inside the body of else block are executed.
यदि टेस्ट कंडीशन सत्य होती है तब if ब्लॉक के स्टेटमेंट रन किये जायेंगे अन्यथा else ब्लॉक के स्टेटमेंट रन किये जायेंगे।
Syntax:-
if(condition) statement;
else statement;
if(condition){
statements;
}
else{
statements;
}
यदि टेस्ट कंडीशन सत्य होती है तब if ब्लॉक के स्टेटमेंट रन किये जायेंगे अन्यथा else ब्लॉक के स्टेटमेंट रन किये जायेंगे।
Syntax:-
if(condition) statement;
else statement;
if(condition){
statements;
}
else{
statements;
}
Comments
Post a Comment