Question: Write an if - else statement to output Less than or equal to 4 3 if the value of userlnput is less than or

Write an if-else statement to output "Less than or equal to 43" if the value of userlnput is less than or equal to 43. Otherwise, output "More than 43". End with a newline.
Ex: If the input is 42, then the output is:
Less than or equal to 43
import java.util.Scanner;
public class Relational {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
int userInput;
userInput =scnr* nextInt ();
Y** Your code goes here */
}
}
 Write an if-else statement to output "Less than or equal to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!