At Westonci.ca, we provide reliable answers to your questions from a community of experts. Start exploring today! Get detailed and accurate answers to your questions from a community of experts on our comprehensive Q&A platform. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.
Sagot :
Answer:
See attachment for complete solution
Explanation:
The program in your question is unreadable.
So, I started from scratch (see attachment for complete solution)
Using the attached file as a point of reference.
The program has 15 lines
Line 1: Prompt the user for highway number (as an integer)
Line 2: Convert the user input to string
Line 3: Check if highway number is outside 1-999
Line 4: If line 3 is true, print a notice that the input is outside range
Line 5: If line 3 is not true
Line 6: Check if the number of highway digits is 2.
Line 7: If true, Check if highway number is an even number
Line 8: If even, print that the highway is primary and heads east/west
Line 9: If highway number is odd number
Line 10: Print that the highway is primary and heads north/south
Line 11: If the number of highway digits is 3
Line 12: Check if highway number is an even number
Line 13: If even, print that the highway is auxiliary and heads east/west
Line 14: If highway number is odd number
Line 15: Print that the highway is auxiliary and heads north/south
See attachment for complete program
We hope our answers were useful. Return anytime for more information and answers to any other questions you have. We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Discover more at Westonci.ca. Return for the latest expert answers and updates on various topics.