Question: Small towns have populations in the range 9 5 0 - 4 3 0 0 inclusive. Write an if statement that outputs Not a small

Small towns have populations in the range 950-4300 inclusive. Write an if statement that outputs "Not a small town" if the input inputSize is not in this range. Otherwise, output "Small town". End each output with a newline.
import java.util.Scanner;
public class TownSize {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int inputSize;
inputSize = scnr.nextInt();
/* Your code goes here */
}
}

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!