Question: This is C++ please let me know what is going on in the code and what really this is and where to insert the headers

This is C++

please let me know what is going on in the code and what really this is and where to insert the headers and all in the explanation thank you.

101 John Smith 65 78 65 89 25 98 -999 102 Peter Gupta 87 34 89 99 26 78 64 34 -999 103 Buddy Friend 23 99 98 97 26 78 100 63 87 23 -999 104 Doctor Miller 62 35 78 99 12 93 19 -999

This is C++ please let me know what is going on in

the code and what really this is and where to insert the

infile >> ID;

while (infile)

{

infile.get(ch);

getline(infile, name);

sum = 0;

infile >> num; // read the first number

while (num != -999)

{

sum = sum + num; // update sum

infile >> num; // read the next number

}

cout

infile >> ID; // begin processing the next line

CENGAGE MINDTAP Take the Tour! Programming Exercise 5-26

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!