Question: Program 1 Review of C+Programming Constructs (This lab assignment is from Prof.Sarah Zelikovitz.) You are the manager of a team of ten programmers who have

 Program 1 Review of C+Programming Constructs (This lab assignment is from
Prof.Sarah Zelikovitz.) You are the manager of a team of ten programmers

Program 1 Review of C+Programming Constructs (This lab assignment is from Prof.Sarah Zelikovitz.) You are the manager of a team of ten programmers who have just completed a seminar in structured programming and top-down design. To prove to your boss that these techniques pay off you decide to run the following contest. You number the programmers 1 through 10, based on their performance in the seminar (I is poorest, 10 is best), and monitor their work. As each does his or her part of your project, you keep track of the number of lines of debugged code turned in by each programmer. You record this number as a programmer turns in a debugged module. The winner of the contest is the first person to reach 1000 lines of debugged code. (You hope this is programmer #9 or #10.) As further proof of the value of these new techniques, you want to determine how many poor programmers it takes to surpass the winner's figure; that is, find the smallest k such that programmers 1 through k (excluding the winner, if he she is in the first k) have turned in more lines than the winner. Input The input consists of a sequence of triples of integers. The first integer in each pair is the programmer's number (an integer from 1 to 10), and the second is the number of executable lines of code turned in, and the third has the number of lines of comments turned in. These numbers occur in the same order as that in which the modules were turned in Read in integers until someone's total executable code goes over 1000. Print out (echo print) each set as you read it. Ignore any input after someone's executable total exceeds 1000. Then print out a table listing the ten programmers and their totals, with the Finally, find the smallest k such that the sum of the totals for programmers I-k exceeds the winners total. Print k in an explanatory sentence Partial Sample Output

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!