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
Vanyuwa [196]
3 years ago
6

Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90)

go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, I-405 services I-5, and I-290 services I-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. 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 the output is: 0 is not a valid interstate highway number.It is coded in c++
Engineering
1 answer:
IrinaVladis [17]3 years ago
3 0

Answer:

#include <iostream>

using namespace std;

int main()

{

int inputNumber ;

cout << "Enter an interstate highway number:";

cin >> inputNumber ;

if(inputNumber<=0 || inputNumber >= 1000)

cout << inputNumber << " is not a valid interstate highway number" << endl ;

else{

if(inputNumber > 99){

cout << "I-"<<inputNumber<< " is auxiliary, ";

int temp = inputNumber % 100 ;

cout <<"serving I-"<<temp<<", ";

if(temp%2==0){

cout << "going east/west." << endl;

}

else{

cout << "going north/south." << endl;

}

}

else{

cout << "I-"<<inputNumber<< " is primary, ";

if(inputNumber%2==0){

cout << "going east/west." << endl;

}

else{

cout << "going north/south." << endl;

}

}

}

return 0;

}

Explanation:

  • Check if input number is greater than 99, then display that the input number is auxiliary.
  • Check if remainder of input number/2 is equal to 0, then display that going east/west.
You might be interested in
Select four types of engineers who might be involved in the development of a product such as an iPhone.
Musya8 [376]

computer engineers

electrical engineers

mechanical engineers

manufacturing engineers

3 0
3 years ago
Read 2 more answers
I really need some help here!
Virty [35]

Explanation:

<h3>1.*Frame Structure have joins which keep them together whereas Shell Structure have no joins.</h3><h3>*Shell Structure usually only support their own weight whereas Frame Structure support others weight as well as themselve.</h3>
7 0
3 years ago
Explain why the following scenario fails to meet the definition of a project description.
s344n2d4d5 [400]

Answer:

The youth hockey training facility

Explanation:

7 0
3 years ago
Which of these passages is an example of cohesive writing?
Oksana_A [137]
The answer mostly likely is: “1” due to the fact it is well ordered, and follows a similar thought process, best of luck!
3 0
3 years ago
Read 2 more answers
What is the area enclosed by the cycle area of the Carnot cycle illustrating on a T-s diagram?
gayaneshka [121]

Answer:

Heat

Explanation:

Carnot cycle:

  Carnot cycle is the ideal cycle for all working engine .Carnot cycle all processes are reversible.It have fore process Out of two are constant temperature process and other two are isentropic process(reversible adiabatic).

We know that area under T-s diagram represents the heat.

So Q=\int Tds

From cycle we can say that

q_{in}=T_2\left ( s_2-s_1 \right )

q_{out}=T_1\left ( s_2-s_1 \right )

4 0
4 years ago
Other questions:
  • A satellite orbits the Earth every 2 hours at an average distance from the Earth's centre of 8000km. (i) What is the average ang
    7·1 answer
  • A brass alloy is known to have a yield strength of 240 MPa (35,000 psi), a tensile strength of 310 MPa (45,000 psi), and anelast
    11·1 answer
  • A heat engine receives 6 kW from a 250oC source and rejects heat at 30oC. Examine each of three cases with respect to the inequa
    7·1 answer
  • (TCO A) Explain how computer-aided design and flexible manufacturing help create small niches in the market place. Provide and e
    5·1 answer
  • Florida's progressive DUI laws take ______<br> into account.
    15·1 answer
  • a vertical cylindrical container is being cooled in ambient air at 25 °C with no air circulation. if the initial temperature of
    12·2 answers
  • A 6-pole, 50 Hz squirrel cage induction motor has rotor resistance and standstill reactance referred to stator of 0.2 ohm and 1
    7·1 answer
  • 13. Write a function which is passed two strings. The function creates a new string from the two original strings by copying one
    13·1 answer
  • The speed of sound in a fluid can be calculated using the following equation:
    6·1 answer
  • Which of the following is an interdisciplinary approach to architectural or interior design most like?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!