Answers for "if for else for"

2

if else statement

int age = 30;

if(age >= 30 && age <= 80){
	System.out.println("Old");
    
}else if(age < 30 && >= 1){
	System.out.println("Young");
    
}else{
	System.out.println("Not Supported");
}
Posted by: Guest on April-18-2022
0

javascript if else

if (condition) {
// what to do if condition is met
} else {
// what to do if condition is not met
}
Posted by: Guest on November-16-2021
0

if else statement

if ((age >= 14) && (age < 19)) {        // logical condition
status = "Eligible.";               // executed if condition is true
} else {                                // else block is optional
status = "Not eligible.";           // executed if condition is false
}
Posted by: Guest on April-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language