Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

input data for a program consists o four lines in a file namedpints.txt stored o

ID: 3616958 • Letter: I

Question

input data for a program consists o four lines in a file namedpints.txt stored on the h: drive. Each line consists of the firstname of a strawberry picker, some spaces,then the umber of wholepints of strawberries picked by the strawberry picker. An exampl ofinput could be: Tim    20 Mercy     25 Sara    15 Evan      9 Write a C++ prgram to read in the data, calculate te totalnumber of pints icked, then express the equivalent amount of fruitin gallons, quarts and pints. (There are 4 qarts per gallon, and 2pints in a quart.) The output should be to the file on the h:drivenamed results.txt. The output should be formatted to show the inputin two labeled columns, wit the calculated results below. For theinput example above, the output appears as follows Name                                    Pints Picked Tim                                                        20 Mercy                                                    25 Sara                                                       15 Evan                                                         9                               otalPints:                  69 This equals 8 gallon(s), 2 quart(s) and 1 pint(s).    input data for a program consists o four lines in a file namedpints.txt stored on the h: drive. Each line consists of the firstname of a strawberry picker, some spaces,then the umber of wholepints of strawberries picked by the strawberry picker. An exampl ofinput could be: Tim    20 Mercy     25 Sara    15 Evan      9 Write a C++ prgram to read in the data, calculate te totalnumber of pints icked, then express the equivalent amount of fruitin gallons, quarts and pints. (There are 4 qarts per gallon, and 2pints in a quart.) The output should be to the file on the h:drivenamed results.txt. The output should be formatted to show the inputin two labeled columns, wit the calculated results below. For theinput example above, the output appears as follows Name                                    Pints Picked Tim                                                        20 Mercy                                                    25 Sara                                                       15 Evan                                                         9                               otalPints:                  69 This equals 8 gallon(s), 2 quart(s) and 1 pint(s).   

Explanation / Answer

please rate - thanks #include #include using namespace std; int main() {int i,pints,tot=0,g,q,; string name; ifstream in; ofstream out; in.open("h://pints.txt");      if(in.fail())              { cout