Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use C++ language to solve this assignment. Assignment You will be developing a program that queries the user for a series of addresses and number
Use C++ language to solve this assignment.
Assignment You will be developing a program that queries the user for a series of addresses and number of occupants. Create a vector to store all addresses and another to store the corresponding number of occupants. Continue reading and storing user input until the user sends the EOF (end of file) signal by pressing Ctrl-D. Then, iterate through your vectors and output each address and its corresponding number of occupants. Each address should be right-aligned in a field 30 characters wide. Occupant count should be left-aligned in a field 3 characters wide. Separate the two columns with the string":" (space colon space). Addresses may contain spaces and the entire input line should be stored as a single address. Example Enter addresses and occupant counts on separate lines (Ctrl-D to quit): 123 Here St 10 456 There Blvd Behind You
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started