Interstate highway numbers

Assignment Help Basic Computer Science
Reference no: EM132184856

Interstate highway numbers

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

Starting code:

#include <iostream>

using namespace std;

int main() {

  int highwayNumber;

  cin >> highwayNumber;

  /* Start code here. */

  return 0;

}

Reference no: EM132184856

Questions Cloud

Monthly average for the year : Once all 12 months data is entered then loop through the array and calculated the total sales for the year and the monthly average for the year.
Control of the council passed from conservatives to labor : Following local elections in May of the same year, control of the Council passed from the Conservatives to Labour.
Experiences networking in new cultural context : To help you carefully reflect on your experiences networking in a new cultural context,
Presentation-the content or the design : 1. Which is more important about a presentation-the content or the design? Why?
Interstate highway numbers : Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 90) go east/west.
Utilitarian ethics when compared with ethics of duties : What are two advantages of a utilitarian ethics when compared with an ethics of duties?
One statement to compute : On a piano, each key has a frequency, and each subsequent key (black or white) is a known amount higher. Ex: The A key above middle C key has
Analyzing the organization of your current workplace : In this assessment you will analyzing the organization of your current workplace.
What product would you like to use to explore supply chain : What product would you like to use to explore the supply chain, and why did you select that specific product? Explain.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Program the control unit for an electronic safe

Program the control unit for an electronic safe. The 8-Segment display and LEDs will show status of the safe

  Information assurance class

Review and reflect on the knowledge you have gained from this course. Based on your review and reflection, write at least 3 paragraphs on the following:

  Freezing of a dead person

Is the freezing of a dead person's (under 18 years old) eggs or sperm an ethical issue or dilemma?

  What is the advantage of parallel form over the cascade form

It is argued that for a rational system function, its cascade form structure is not unique. Do you agree or disagree? Explain.

  Why it important to standardize hardware as well as software

Discuss why it is important to standardize hardware as well as software. As the system administrator, you are tasked with communicating information about computer components to employees at your company.

  How different forms of data mining can be used

Research and describe a data mining application that was not presented in this chapter. Discuss how different forms of data mining can be used in the application.

  What about cloud backups

What about Cloud Backups? Do you think that the Cloud is secure enough to trust it with our sensitive data? Why or why not? How can we tell?

  Write down the tic-tac-toe program for given information

Even if the computer has a move that gives an immediate win, it may not make it if it detects another move that is also guaranteed to win.

  Give an algorithm to record global state

Consider a distributed system where every node has its physical clock and all physical clocks are perfectly synchronized.

  What are the advantages of using excel over lists

What are the advantages of using Excel over lists, paper files, or simple Word documents? Are there any disadvantages? Explain your answer.

  Balance and the owner of the account

Construct a class that will model a bank account. A bank account will know the balance and the owner of the account. In addition to creating a bank account, money can bedeposited in the account

  Major competitor for windows

Apple's Mac OS is a major competitor for Windows, and many people feel very strongly about choosing one over the other. For this assignment, locate articles online that discuss the differences between Windows and Mac OS.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd