Question: Primary U . S . interstate highways are numbered 1 - 9 9 . Odd numbers ( like the 5 or 9 5 ) go

Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (ike the 10 or 90) go
east/west Auxiliany highways are numbered 100-99, and service the pr mary highway indicated by the rightmost two digits. Thus, 1-405
services 1-5, and 1-290 services 1-90. Note: 200 is not a vald auxillary highway because 00(5 not a valid primary highway number.
Given a highway number, indicate whether it 5 a primary or auxillary highway. If auxilary, indicate what primary highway it serves. Also
indicate if the (primary) highway runs north/south or east/west.
Ex: If the input is:
90
the output is:
I-90 is primary, going east/west.
Ex: If the input is:
290
the output is:
I-290 is auxiliary, serving I-90, going east/west.
Ex: If the input is:
0
or any number not between 1 and 999, the output is:
0is not a valid interstate highwey number.
Ex: If the input is:
200
the output is:
200is not a valid interstate highway number.
See Wikipedia for more info on highway numbering.
Laport Java.utll.Scanner;
public class Latbrogram {
public static vold main(String() args)({
Scanner sonr = new Scanner(Systen, in);
Int highwayNumber;
10t primaryNunber;
highwayNumber = scn% nextInt();
1* Type your sode here. */
)
Primary U . S . interstate highways are numbered

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 Programming Questions!