Question: Valid ZIP codes for delivering mail within the United States are in the range 1 0 0 0 0 - 9 9 9 5 0

Valid ZIP codes for delivering mail within the United States are in the range 10000-99950 inclusive. Write an if statement that outputs "Invalid ZIP code" if the input zipVal is not in this range. Otherwise, output "Valid ZIP code". End each output with a newline.
Click here for examples
import java.util.Scanner;
public class ZipCodes {
public static void main(String args){
Scanner scnr = new Scanner(
System.in);
int zipVal;
zipVal =scnr*nextInt()
Y** Your code goes here */
}
}
 Valid ZIP codes for delivering mail within the United States are

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!