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 uses type def

Write a C++ program the uses type def, enumerated types, structures, and structure pointers where appropriate. Make sure the function String_To_MDY() assumes that the user correctly enters the date in the form mm/dd/yyyy.

  What steps should you take to determine the issue

With Motherboard beep codes what should you do If there is no beep, or if nothing happens after the power button is pressed, what steps should you take

  Show how to build a two bcd digit counter

(Offset Counters) Use 163 counter components and only NAND gates (with any number of inputs) and inverters to implement a BCD counter. Show how you would construct a one BCD digit counter. Show how to build a two BCD digit counter.

  Discuss the importance of using an access control model

Discuss the importance of using an access control model in determining how employees in an organization should gain access to resources.

  Capability to ask the user for input

Extra credit: Add the capability to ask the user for input and make sure what they have entered is a number.

  Based on the number of units he sells

Adrian receives an hourly wage of $12 per hour plus commission. His commission is based on the number of units he sells. He works a normal 40-hour week, gets paid bi-weekly, and has a commission rate of 20%.

  Which structure would be the best for the storyboard created

He would like his recipes to be displayed in very simple, step by step pages. Which structure would be the best for the storyboard created for one of his recipes?

  Compress some already compressed files

Given a compression function c as in (a), give a function c ′ such that for all bit strings s, length(c ′ (s)) ≤ min(length(c(s)), length(s)) + 1; that is, in the worst case, compression with c ′ expands the size by only 1 bit.

  Perturbation theory to derive the pca

In Section 8.4, we used perturbation theory to derive the PCA.In this problem we address this same issue from the perspective of a constrained-optimization approach.

  Marginal costs slope down

Take the case in which all individuals are risk averse, so that marginal costs slope down.

  Can you determine why these functions are being called

Can you determine why these functions are being called?

  Supply-and-demand diagram to illustrate shortage

Use a supply-and-demand diagram to illustrate this shortage. Be sure to carefully label all axes, curves, and the shortage. Briefly explain your figure in words

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