Question: Help please!!! Important!! Extra good vote :) tia 8. CODING (20 points): Write an entire C++ program to solv containing an arbitrary number of rows.
8. CODING (20 points): Write an entire C++ program to solv containing an arbitrary number of rows. On each row, a city, color, and cou there will be no spaces in the cities or colors. Do not create any functions. The main() will be responsible for: e this problem. The program will read from a file nt will appear. You should assume that -Opening input file ("exam.txt") for reading. No need to check for file failure. Assume it opened okay. With each row of data, the following should be performed if the color is not purple: o Create output file with a filename of the city followed by "txt". No need to check for file failure Assume it opened okay. o Write color to the file count times, with each occurrence appearing on a separate row. o Write filename to the screen. o Close output file Continue reading the input file until EOF is reached Closing input file The following is a sample input file: boston portland florence The program would create 2 output files. The first file, "boston.txt", would consist of 5 lines of "blue" blue 5 purple 15 green 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
