Answer to Question #51470 in C++ for Josh

Question #51470
Declare variables to hold the following fields. Year State Population Violent crime total Murders Rape Robbery Assault Property crime total Burglary Larceny-theft Motor vehicle theft Note other variables may be needed. Use string types for the year and state and the integer type for the remaining record field variables. Output your Welcome message. Remember to use your name in the message. Use nested loops. The outer loop should do the following: Prompt for the name of the state to display or the sentinel value “quit”. Use the appropriate console input statement to read state names that may include spaces e.g., New York. Check if the sentinel value “quit” has been entered, if it has then exit the outer loop and terminate the program. Otherwise, open the crime statistics file. See the “crimesbystate1.txt” file. Check if the file has been opened successfully. Issue an error message and abort the program if there is an error.
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog