C++ Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go...

50.1K

Verified Solution

Question

Mechanical Engineering

C++ Primary U.S. interstate highways are numbered 1-99. Oddnumbers (like the 5 or 95) go north/south, and evens (like the 10or 90) go east/west. Auxiliary highways are numbered 100-999, andservice the primary highway indicated by the rightmost two digits.Thus, the 405 services the 5, and the 290 services the 90.

Your program will prompt the user to type a highway number(\"Please enter a highway number, Ex: 65: \"), read in the numbertyped by the user, and print out whether it is a primary orauxiliary highway. If auxiliary, indicate what primary highway itserves.

Also your program must indicate if the (primary) highway runsnorth/south or east/west, that it is an invalid number if notbetween 0 and 999.

Answer & Explanation Solved by verified expert
3.8 Ratings (737 Votes)
Code for the same is attached    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students