Question: Problem 3 . 3 In the US Interstate system, the numbering of an interstate gives you useful information about the highway. Primary interstates have 1

Problem 3.3
In the US Interstate system, the numbering of an interstate gives you useful information about the
highway. Primary interstates have 1- or 2-digit numbers (that is, between 1 and 99). Odd-numbered
interstates run north-south, and even-numbered interstates run east-west. Three-digit interstates
(numbered >100) are auxiliary interstates, and the last two digits represent the primary interstate they
serve. If the hundreds digit is odd, then the interstate is a spur. If the hundreds digit is even, the
interstate is a bypass. For example, highway I-110 is a spur of I-10, which itself runs east-west.
Do the following:
a) Design a flowchart that would take an integer (between 1-999) and display the appropriate
message out of the ones below, based on the rules given above.
i. "The Interstate is a north-south primary interstate."
ii. "The Interstate is an east-west primary interstate."
iii. "The Interstate is a spur of the primary interstate:
##?''
iv. "The Interstate is a bypass of the primary interstate:
##"
b) Come up with the mathematical expressions you might need to answer the questions in your
flowchart.
Hint: Calculate the expression xMOD2 for several even and odd values of x.
Problem 3 . 3 In the US Interstate system, the

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!