1 Overview A group of chimpanzees at Gotham Zoo are given a series of tasks to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1 Overview A group of chimpanzees at Gotham Zoo are given a series of tasks to perform every morning to test their mood and abilities to do work. There are 2 rooms (call them room A and room B) open to them each containing 4 tasks; the chimps learn that they immediately get a special treat when they complete any 5 tasks total out of both rooms. So each day they get to choose which tasks that they wish to complete. For each task that they successfully attempt a computer records their success in completing the task as a integer score in the range of 1-50 (inclusive). Unattempted tasks are indicated with a score of 0, and a negative score indicates a data error that usually indicates the chimp abused the equipment. Any trials with negative individual scores or no attempts are not counted in the overall statistics. Also if more tasks than required are completed, then the first ones completed in order are counted and the later ones are disregarded. Write a C program to read in each chimp's id number (a 4 digit value) followed by 8 scores (with each score being in the range 0-50 inclusive). An id number of 0 indicates the end of input. The data collection computer guarantees that the correct number of input values are always recorded and that the end-of-data is always indicated with a 0 for the id. Here is some sample input data: 2199 20 0 0 20 0 20 20 20 7001 0 0 0 0 0 0 0 0 7012 0 20 0 0 0 0 20 20 4000 -1-1-1 -1 -1 -1 -1 -1 1422 20 0 18 20 0 20 19 20 1372 -1 -1 18 11 0 20 0 20 0 Input to your program must come from standard input via redirection on the command line (as discussed in class; see the sample run below). You will echo print each student's id and scores along with printing out their result and all appropriate comments; do this in the table format shown in the sample run. Output, including all labels and spacings, must appear exactly as it appears in the sample run below. Depending on the data entered your program should also print out one of the following comments where appropriate (where n is the number of valid trials): Invalid trial. No attempts. 1 Overview A group of chimpanzees at Gotham Zoo are given a series of tasks to perform every morning to test their mood and abilities to do work. There are 2 rooms (call them room A and room B) open to them each containing 4 tasks; the chimps learn that they immediately get a special treat when they complete any 5 tasks total out of both rooms. So each day they get to choose which tasks that they wish to complete. For each task that they successfully attempt a computer records their success in completing the task as a integer score in the range of 1-50 (inclusive). Unattempted tasks are indicated with a score of 0, and a negative score indicates a data error that usually indicates the chimp abused the equipment. Any trials with negative individual scores or no attempts are not counted in the overall statistics. Also if more tasks than required are completed, then the first ones completed in order are counted and the later ones are disregarded. Write a C program to read in each chimp's id number (a 4 digit value) followed by 8 scores (with each score being in the range 0-50 inclusive). An id number of 0 indicates the end of input. The data collection computer guarantees that the correct number of input values are always recorded and that the end-of-data is always indicated with a 0 for the id. Here is some sample input data: 2199 20 0 0 20 0 20 20 20 7001 0 0 0 0 0 0 0 0 7012 0 20 0 0 0 0 20 20 4000 -1-1-1 -1 -1 -1 -1 -1 1422 20 0 18 20 0 20 19 20 1372 -1 -1 18 11 0 20 0 20 0 Input to your program must come from standard input via redirection on the command line (as discussed in class; see the sample run below). You will echo print each student's id and scores along with printing out their result and all appropriate comments; do this in the table format shown in the sample run. Output, including all labels and spacings, must appear exactly as it appears in the sample run below. Depending on the data entered your program should also print out one of the following comments where appropriate (where n is the number of valid trials): Invalid trial. No attempts.
Expert Answer:
Answer rating: 100% (QA)
Based on the provided context here is a C program that reads in each chimpanzees ID ... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
If a brand intentionally engages in greenwashing and is called out for its duplicity, is an apology enough? If yes, why is it enough and should we then trust that the brand will act with integrity...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Which type of philosophical reasoning begins with one example and varies it to see how dramatic the change is, which uncovers its most crucial characteristics?
-
Suppose that you wish to apply a 0.25-V potential difference between two points on the human body. The resistance is about 2000 , and you only have a 9.0-V battery. How can you connect up one or more...
-
Accounts Payable $26,810 Short-Term Investments $16,830 Land $21,480 Cash $23,110 Factory Equipment $30,390 Loans Payable $28,370 Office Furniture $28,370 Prepaid Expenses $22,680 Unearned Revenue...
-
Sometimes financial statements will show "unearned revenue." How does this arise? What type of transactions might be typical examples?
-
Chico Company allows its customers to return merchandise within 30 days of purchase. At December 31, 2016, the end of its first year of operations, Chico estimates future period merchandise returns...
-
More info The company manufactures a variety of engines for use in farm equipment. At the beginning of the current year, Dansville estimated that its overhead for the coming year would be $300,000....
-
There is a parcel of land next to the Playful Paws, Inc. building. Ellen, the owner of this property, approached John to discuss the idea of selling it to him. John is interested. Ellen knows that...
-
Can any two assets be combined and called a portfolio? If so, how can we selectively pick assets so that the portfolio performs "better" than the single assets on a standalone basis? How do we...
-
Bernardino Santos-Rodiguez was piloting a boat owned by his friend, Raul Viera-Torres, in waters near Guayama, Puerto Rico. The boat was equipped with a hydraulic steering system manufactured by...
-
Which of the following is an activity not usually associated with forensic accounting and fraud examination consulting and litigation support? 1. A. Assessing fraud risk associated with internal...
-
Washington Tennis & Education Foundation, Inc. (WTEF) is a nonprofit organization operating in the District of Columbia that provides athletic and academic programs for children from low-income...
-
Stone Brewing Co. is a San Diego brewer that has sold its beers for over two decades. Stone has maintained its trademark and brand from the beginning, registering the STONE mark in 1998. Stone has...
-
In a contract dispute between a US company and a Canadian company, the contract itself referred to provisions of the Uniform Commercial Code. Do these references alone preempt the contract from being...
-
12. MS-EXCEL can be used to automate A) Financial statements, Business forecasting B) Transactionregisters, and inventory control C) Accounts receivable, accountspayable D) Any of the above 13. You...
-
A 20-cm-square vertical plate is heated to a temperature of 30oC and submerged in glycerin at 10oC. Calculate the heat lost from both sides of the plate.
-
On June 15, a newspaper columnist predicted that the coast of State X would be flooded on the following September 1. Relying on this pronouncement, Gullible quit his job and sold his property at a...
-
In February, Brady contracted to construct a house for Fulghum for $106,850. Brady began construction on March 13. Neither during the negotiation of this contract nor when he began performance was...
-
A statute requires all vessels traveling on the Great Lakes to provide lifeboats. One of Winston Steamship Companys boats is sent out of port without a lifeboat. Perry, a sailor, falls overboard in a...
-
Normal (nonmutant) tumor-suppressor genes often function a. as negative regulators of cell division. b. in the maintenance of genome integrity. c. in the stimulation of cell division. d. as both a...
-
The underlying cause(s) of epigenetic changes associated with cancer may be a. mutations in genes that encode chromatin-modifying proteins. b. environmental agents that alter the function of...
-
Most forms of cancer involve a. the activation of a single oncogene. b. the inactivation of a single tumor-suppressor gene. c. the activation of multiple oncogenes. d. the activation of multiple...
Study smarter with the SolutionInn App