Java Demo
Java Code
Output
public class decison_making { public static void main(String []args) { int x; x=35; if (x <= 10) { System.out.println("The value of x is less than or equal to 10!"); } else if (x <= 20) { System.out.println("The value of x is less than or equal to 20!"); } else if (x <= 30) { System.out.println("The value of x is less than or equal to 30!"); } else if (x <= 40) { System.out.println("The value of x is less than or equal to 40!"); } else if (x <= 50) { System.out.println("The value of x is less than or equal to 50!"); } else { System.out.println("The number is greater than 50!"); } } }