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
Q2: The average water height of an ocean area is 2.5 m high and each wave lasts for an average period of 7 s. Determine (a) the
navik [9.2K]

Answer:

(a) 561.12 W/ m² (b) 196.39 MW

Explanation:

Solution

(a) Determine the energy and power of the wave per unit area

The energy per unit are of the wave is defined as:

E = 1 /16ρgH²

= 1/16 * 1025 kg/ m3* 9.81 m/s² * (2.5 m )²

=3927. 83 J/m²

Thus,

The power of the wave per unit area is,

P = E/ t

= 3927. 83 J/m² / 7 s = 561.12 W/ m²

(b) The average and work power output of a wave power plant

W = E * л * A

= 3927. 83 J/m² * 0.35 * 1 *10^6 m²

= 1374.74 MJ

Then,

The power produced by the wave for one km²

P = P * л * A

= 5612.12 W/m² * 0.35 * 1* 10^6 m²

=196.39 MW

8 0
3 years ago
When does the vc-turbo engine use lower compression ratios?.
Veronika [31]

Answer:

Explanation:

The VC-T engine (for "variable compression, turbocharged") can adjust its compression ratio between 8:1 and 14:1 on the fly, offering high-compression efficiency under light loads and the low compression needed for turbocharged power under hard acceleration.

7 0
2 years ago
Salvage ethnography is the effort to ensure that ethnography remains an important part of anthropology. recording of linguistic
fenix001 [56]

Answer:

                D

Explanation:

                            D

6 0
4 years ago
The first step in treating shock is to
san4es73 [151]

Answer:

Lay the person down and elevate thier legs slightly.

Explanation:

5 0
3 years ago
technician A says that voltage is electric pressure .Technician B says the amperage is electrical flow who is right
Dmitrij [34]

Answer:

I would say technician A

Explanation:

Definition of voltage- An electromotive force or potential difference expressed in volts.

electromotive force is pressure so technician A would make sense.

5 0
3 years ago
Other questions:
  • Electric heater wires are installed in a solid wall having a thickness of 8 cm and k=2.5 W/m.°C. The right face is exposed to an
    5·2 answers
  • What material resources and intellectual resources were used in self driving cars?
    15·1 answer
  • Description: Write a function that takes in a list of numbers and a list of indices. Note that indexList may not only contain va
    8·1 answer
  • Define Plastic vs elastic deformation.
    13·1 answer
  • Ventajas motor avion
    5·1 answer
  • A 800-MW steam power plant, which is cooled by a nearby river, has a thermal efficiency of 40 percent. Determine the rate of hea
    5·1 answer
  • Consider a Carnot heat pump cycle executed in a steady-flow system in the saturated mixture region using R-134a flowing at a rat
    5·1 answer
  • If you are setting up a race car. What is the cross weight? Does it matter?
    5·1 answer
  • What is the Energy of moving things?<br><br> mechanical<br> sound<br> nuclear<br> Light
    13·2 answers
  • Which material has the highest cp value?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!