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 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 mainString args
Scanner scnr new Scanner
System.in;
int zipVal;
zipVal
Your code goes here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
