this is the work "students at a school volunteered to sell fresh baked cookies to raise funds to increase the number of computers in the computer lab. Each student reported the number of boxes he/she sold. Write a program that wil output the total number of boxes of cookies sold, the total revenue generated by selling the cookies and the saverage number of boxes sold by each student. The programmer do not know the exact number of volunteers involved, we assume that -1 that will mark the end of the data.
Assume the data input is in the following form: student's name followed by a space and the number of boxes sold by the student
My guess to what you mean by "sentinel-controlled while loop" is "loop until the user says to stop". If that is the case, you could make your loop conditional -1, but its much easier to use Boolean's (since these technically represent the values 0 and 1 respectively) once you understand the logic.