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
Lesechka [4]
3 years ago
10

Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and events (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.

Computers and Technology
2 answers:
Norma-Jean [14]3 years ago
4 0

Answer:

The C code for the problem is given below

Explanation:

#include <stdio.h>

int main() {

   int highwayNumber;

   int primaryNumber;

   scanf("%d", &highwayNumber);

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

       if (highwayNumber <= 99) {

           if (highwayNumber % 2 == 0) {

               printf("I-%d is primary, going east/west.\n", highwayNumber);

           } else {

               printf("I-%d is primary, going north/south.\n", highwayNumber);

           }

       } else {

           primaryNumber = highwayNumber;

           highwayNumber %= 100;

           if (highwayNumber % 2 == 0) {

               printf("I-%d is auxiliary, serving the I-%d, going east/west.\n", primaryNumber, highwayNumber);

           } else {

               printf("I-%d is auxiliary, serving the I-%d, going north/south.\n", primaryNumber, highwayNumber);

           }

       }

   } else {

       printf("%d is not a valid interstate highway number.\n", highwayNumber);

   }

   return 0;

}

poizon [28]3 years ago
4 0

Answer:

CODE IN C++:

#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;

}

OUTPUT:

[ find attachment ]

You might be interested in
20 POINTS!!!!!!!!!! will give brainliest
PilotLPTM [1.2K]

Answer:

Release

Explanation:

Founders Education

4 0
3 years ago
EASY POINTS
Dmitry [639]
Its answer D because I took the same test and it told me that my answer was right that I put down and it was D.

3 0
3 years ago
Write one DDL statement to add a new table Project into exam1. It contains the followingthree columns:-ProjNum of char(3) type,
Goryan [66]

Answer:

Check the explanation

Explanation:

When it comes to database management systems, a query is whichever command that is used in the retrieval of data from a table. In a Structured Query Language (SQL), generally queries are more or less always made by using the SELECT statement.

I have been trying to type it here but it's not working

so kindly check the code in the attached image below

8 0
3 years ago
Write code that does the following: opens an output file with the filename numbers.txt , uses a loop to write the numbers 1 thro
otez555 [7]
#include <iostream> #<span>include <fstream> </span>using<span> namespace std; int main( int argc, ... </span>outputFile.open( "<span>primeNumbers.txt" ); //

Maybe this will help :)</span>
3 0
3 years ago
Read 2 more answers
What is an example of a way a farm could apply new technology to improve sustainability
Agata [3.3K]

An example of a way a farm can apply new technology to ensure sustainability is: D. the use of artificial intelligence to predict and adjust the farms water usage.

<h3>What is Precision Agriculture?</h3>
  • Precision Agriculture can be defined as a management strategy that employs artificial intelligence (AI) in collating, processing and analyzing different form of data and information in order to support farm management decisions to increase efficiency and sustainability of agricultural production.
  • Examples of precision agriculture includes the use of drones, irrigation technologies, and Global Positioning Systems (GPS).

Therefore, an example of a way a farm can apply new technology to ensure sustainability is: D. the use of artificial intelligence to predict and adjust the farms water usage.

Learn more about precision agriculture on:

brainly.com/question/25110597

8 0
2 years ago
Other questions:
  • Businesses sometimes achieve uninterruptible service by using a technology known as ____ to keep a mirror copy of all their data
    11·1 answer
  • Methods for preventing/overcoming group conflict include all EXCEPT:
    10·1 answer
  • Which registry hive is loaded first during windows startup?
    5·1 answer
  • What is the film format that many filmmakers feel is superior to any other format?
    13·1 answer
  • A person you respect who offers you advice and assistance is known as a(n) _____.
    12·1 answer
  • What number system do people in America use?
    10·2 answers
  • If you are worried that team members will not keep sensitive information private, you could ask them to sign a ________ agreemen
    15·1 answer
  • Phishing (pronounced fishing) is malware sent through e-mail that looks like a legitimate message from a trusted sender. The goa
    10·2 answers
  • A computer has three main modules that have individual reliabilities of 0.77, 0.94, and 0.81. Because of recent failures, manage
    15·1 answer
  • What is game development​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!