1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
den301095 [7]
3 years ago
12

Hello, please help write code in C++. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go nort

h/south, and evens (like the 10 90) go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two-digits. Thus, the 405 services the 5, and the 290 services the 90. Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west. If the input is 90, the output is: The 90 is primary, going east/west. If the input is 290, the output is: The 290 is auxiliary, serving the 90, going east/west. If the input is not 1-999 such as 0, the output is: 0 is not a valid interstate highway number.
Computers and Technology
1 answer:
krok68 [10]3 years ago
3 0

Answer:

Please Find attached  c++ code file.

Explanation:

  1. Ask User to enter highway number.
  2. Check if highway is primary or auxiliary.
  3. Check if highway number is even / odd.
  4. Find Primary high number for an auxiliary highway

Check if highway is primary or auxiliary.

Use if condition to check if the entered number is in between 0 and 99.If it's true than the highway is primary otherwise it's an auxiliary highway.

Check if highway number is even / odd.

To check if a number is even or odd we use simple modulo formula. In mathematics modulo returns the reminder of a division operation on two numbers.If modulo of a number and 2 is equal to zero than that number is an even number other wise its an odd number.

(Any number ) mod 2 = 0

Find Primary high number for an auxiliary highway

As mentioned in the question last two digits of highway number is the number of primary high.

To Find last two digits of number apply modulo operation on highway number and 100. it will provide last two digits of number specifying our primary highway.

Download cpp
You might be interested in
A a a a I don't need help!?
Arlecino [84]

Answer:

ok

Explanation:

ok

6 0
2 years ago
What is the best definition of a network?
Nataliya [291]

Answer:

like tv or wifi

Explanation:

6 0
2 years ago
Read 2 more answers
Cisco cyber security would classify this email?
Nookie1986 [14]

Cisco cyber security would classify this email as security threats.

<h3>How do Cisco cyber security classify email security threats?</h3>

They classify them as:

  • Malware Delivery via Spam.
  • Credential Theft
  • Business Email Compromise, etc.

Note that in the case above, Cisco cyber security would classify this email as security threats

Learn more about Cisco from

brainly.com/question/23388335

#SPJ12

8 0
1 year ago
Why is it Called Eleven and Not Onety-One? This is an actual question I'm curious.
ANTONII [103]

Answer: Ten is not called onety because you have ten fingers and not nine. That part is actually extremely logical and straightforward. Besides, what do you think "ty" actually means? You suggest that we say "one ten" every time we want to say "ten". Now that is illogical.

Explanation:

7 0
2 years ago
Read 2 more answers
Who invented "qwerty" On the keyboard and why did that person mix up all of the letters
alexandr402 [8]

Answer: Prototypes had a problem with the bars colliding with each other and jamming. So the story goes that he arranged the keys with the most common letters in hard to reach spots, to slow typists down and try to avoid this problem.

Explanation: In the 1860s, a politician, printer, newspaper man, and amateur inventor in Milwaukee by the name of Christopher Latham Sholes spent his free time developing various machines to make his businesses more efficient.

Hope this helped!

4 0
3 years ago
Other questions:
  • K
    15·2 answers
  • Data warehousing and data mining mean the same thing when applied to CRM
    7·2 answers
  • Select the best answer for the question. 2. What is the simplest way to permanently get rid of an unwanted file?
    13·1 answer
  • This graph shows both a reflection and a
    14·2 answers
  • What helped Taylor through her tough time with being bullied
    7·1 answer
  • Which of the following is a default letter assigned for the primary hard drive
    6·2 answers
  • When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
    11·2 answers
  • What type of coverage pays for damage incurred as a result of theft, vandalism, fire or natural disaster?
    15·1 answer
  • Perceptron simplest definition
    14·1 answer
  • Which is NOT true?<br> 9 + 4 = 17 - 4<br> 8 + 7 = 14 + 3<br> 11 = 19 - 8<br> 5 + 8 = 20 - 7
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!