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
Aleks [24]
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, 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. Ex: If the input is: 90 the output is: The 90 is primary, going east/west. Ex: If the input is: 290 the output is: The 290 is auxiliary, serving the 90, going east/west Ex: If the input is G here to search The 290 is auxiliary, serving the 90, going eas Ex: If the input is: 0 or any number not between 1 and 999, the output is: 0 is not a valid interstate highway number. See Wikipedia for more info on highway numbering LAB 4.16.1: LAB: Interstate highway numbers ACTIVITY LabProgr- 1 import java.util.Scanner; 2 3 public class LabProgram public static void main(Stringl] args) t Scanner scnr new Scanner(System.in); int highwayNumber; int primaryNumber; 4 5 6 7 highwayNumber scnr.nextInt(); 1e Type your code
Engineering
1 answer:
Gekata [30.6K]3 years ago
6 0

Answer:

The Java code is given below with appropriate variable names and tags for better understanding

Explanation:

import java.util.Scanner;

public class LabProgram{

   public static void main(String[] args) {

       Scanner scnr = new Scanner(System.in);

       int highwayNumber;

       int primaryNumber;

       highwayNumber = scnr.nextInt();

       if(highwayNumber<1 || highwayNumber>999)

           System.out.println(highwayNumber+" is not a valid interstate highway number.");

       else{

           if(highwayNumber>=1 && highwayNumber<=99){

               System.out.print("The "+highwayNumber+" is primary, going ");

               if(highwayNumber%2==1)

                   System.out.println("north/south.");

               else

                   System.out.println("east/west.");

           }

           else{

               primaryNumber = highwayNumber%100;

               System.out.print("The "+highwayNumber+" is auxillary, serving the "+primaryNumber+", going ");

               if(primaryNumber%2==1)

                   System.out.println("north/south.");

               else

                   System.out.println("east/west.");

           }

       }

   }

}

You might be interested in
What type of fire extinguisher is used for electrical fires.
AysviL [449]
The all purpose one will work or you could use type C I believe.
8 0
3 years ago
The beam is supported by a pin at A and a roller at B which has negligible weight and a radius of 15 mm. If the coefficient of s
Anettt [7]

Answer:

33.4

Explanation:

Step 1:

\sumMo=0 (moment about the origin)

Fb(15)-Fc(15)=0

Fb=Fc

Step 2:

\sumFx=0

-Fb-Fccos\theta+Ncsin\theta=0

Fc=0.3Nc=Fb

-0.3Nc-0.3Nccos\theta+Ncsin\theta=0

(-0.3-cos\theta+sin\theta)Nc=0----(1)

\sumFy=0

Nccos\theta+Fcsin\theta-Nb=0

Nccos\theta+0.3Ncsin\theta-Nc=0

Nc[cos\theta+0.3sin\theta-1]=0--------(2)

Solving eq (1) and eq (2)

\theta=33.4

Step 3:

As the roller is a two force member

2(90-\phi)+\theta=180

\phi=\theta/2

\phi=Tan(\muN/N)-1

\phi=16.7

\theta=2x16.7=33.4

5 0
3 years ago
The assembly consists of two 10 mm diameter red brass C83400 coper rods AB and CD, a 15 mm diameter 304 stainless steel of EF an
My name is Ann [436]

Answer:

Therefore, the horizontal displacement of end F of rod EF is 0.4797 mm

Explanation:

solution is mentioned in steps.

6 0
3 years ago
"Given a nodal delay of 84.1ms when there is no traffic on the network (i.e. usage = 0%), what is the effective delay when netwo
shtirl [24]

Answer:

Explanation:

effective delay = delay when no traffic x \frac{100}{100- network\r usage}

effective delay = 84.1 \times \frac{100}{100-39.3}=138.55024711697ms

4 0
3 years ago
An open tank contain oil of specific gravity 0.75 on top of
n200080 [17]

Let's not take into account atmospheric pressure.

Pressure P = Pressure of oil column + Pressure of water column

= h1 . d1.g + h2.d2. g

=( 0.5 x 800 x 9.8) + ( 1x 1000x 9.8) = 3920+ 9800 = 13720

Hence guage pressure at bottom is

P= 13720 N/ m^2

8 0
2 years ago
Other questions:
  • Write a SELECT statement that returns the same result set as this SELECT statement. Substitute a subquery in a WHERE clause for
    10·1 answer
  • Tech A says that low compression on a single cylinder will cause an engine not to start. Tech B says that low compression on a s
    7·1 answer
  • Consider a single crystal oriented such that the slip direction and normal to the slip plane are at angles 42.7° and 48.3°, resp
    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
  • What are the complex structures and the advantages and disadvantages
    6·1 answer
  • The beam below will be subjected to a live load of 600 lb/ft, a concentrated live load of 25 kip, and a dead load of 300 lb/ft.
    15·1 answer
  • What does 3CuCI2 mean
    11·1 answer
  • Please help i really don't understand.
    8·1 answer
  • Technicians are normally paid in all of the following methods except:
    8·2 answers
  • In alternating current, how often does the current alternate between negative and positive?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!