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]
4 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]4 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
You need to write th java syntax for the expression “7 is greater than or equal to 3” choose the best answer
shtirl [24]
If(7>=3)
{
.
.
.
}
Mark as brainliest
8 0
4 years ago
A company is in the middle of an operating system update to Windows 10 from Windows XP, Windows 7, and Windows 8.x. The diverse
Romashka-Z-Leto [24]

Answer:

Option A is the correct option.

Explanation:

The following option is true because when the user or any organization is installing the updates of an operating system and then, some technicians that its failure and they observe that 100% usage of the computer's CPU is done and the user takes the advice of the technicians regarding to the following queries then, they tell them the following problem is that there is an insufficient numbers of the physical processor cores.

8 0
3 years ago
DO YOU EVER FEEL LIKE A PLASTIC<br> DRIFTING THROUGH THE WIND, WANTING TO START AGAIN
Anna35 [415]

Answer:

what exactly is the question because I don't see anything

4 0
3 years ago
Read 2 more answers
Which of the following does not illustrate an effect of media on human communication?
Lyrx [107]

I'd choose B as the answer.

Our entire social lives these days are mediated and we are now leaving in a mediated era. Social media, for instance, has profoundly influenced in inter-personal communication. Options A and D contributes to the interaction and the fulfillment of peoples’ social needs and social media has become a preferred mode of communication with the rise of digital and mobile technologies. Social media has negatively impacted and reduced face to face interactions of human beings, whether business wise or through personal communication. Option C also illustrates an effect of media on human communication, which only leaves us with option B

3 0
4 years ago
What are the TV resolutions
Leokris [45]
Numbers like 1080p and 4K refer to a TV's<span> screen </span>resolution and<span> the more pixels a screen has the more picture detail it can show.</span>
6 0
3 years ago
Other questions:
  • Which type of energy conversion is an electric generator designed to perform?
    8·1 answer
  • Bullet points on a slide should be limited to _____. 2 4 8 10
    15·2 answers
  • Make a program (C++). Sum of a 4 digits number and eliminating last digitsȘ
    13·1 answer
  • Name this<br><br>The feature allows you to add text/picture in the background of the document. ​
    11·1 answer
  • We need ____ pointers to build a linked list.
    6·1 answer
  • Low-end CRM systems are designed for companies like Boeing because they only have a few, large customers.
    11·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • I need help with this
    12·1 answer
  • What are the values of a[k] and a[k+1] after code corresponding to the following pseudocode runs?
    9·2 answers
  • True or False: Mapping annotations are exclusive - an annotated method will only be accessible to requests sent to a matching UR
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!