Write a C++ program that asks the user to input several grades of a student (assume...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C++ program that asks the user to input several grades of a student (assume the range is from 0-100), calculates and displays the average, the minimum, the maximum of all grades. As you do not know the number of grades in advance, use asentinel-control repetitionto stop accepting grades if a sentinel value is entered (use -1 as a sentinel value). Sample Input/Output end): 94 Enter grades (-1 to end): 85 Enter grades (-1 to Enter grades (-1 to end): 63 Enter grades (-1 to end): 72 Enter grades (-1 to end): -1 The average grade is: 78.5 Enter grades (-1 to end): 85 Enter grades (-1 to end): 94 Enter grades (-1 to end): 63 Enter grades (-1 to end): 72 Enter grades (-1 to end): -1 The average grade is: 78.5 The maximum grade is: 94 The minimum grade is: 63 : Enter grades (-1 to end): 100 Enter grades (-1 to end): 90 Enter grades (-1 to end): 70 Enter grades (-1 to end): -1 The average grade is: 86.6667 The maximum grade is: 100 The minimum grade is: 70 Write a C++ program that asks the user to input several grades of a student (assume the range is from 0-100), calculates and displays the average, the minimum, the maximum of all grades. As you do not know the number of grades in advance, use asentinel-control repetitionto stop accepting grades if a sentinel value is entered (use -1 as a sentinel value). Sample Input/Output end): 94 Enter grades (-1 to end): 85 Enter grades (-1 to Enter grades (-1 to end): 63 Enter grades (-1 to end): 72 Enter grades (-1 to end): -1 The average grade is: 78.5 Enter grades (-1 to end): 85 Enter grades (-1 to end): 94 Enter grades (-1 to end): 63 Enter grades (-1 to end): 72 Enter grades (-1 to end): -1 The average grade is: 78.5 The maximum grade is: 94 The minimum grade is: 63 : Enter grades (-1 to end): 100 Enter grades (-1 to end): 90 Enter grades (-1 to end): 70 Enter grades (-1 to end): -1 The average grade is: 86.6667 The maximum grade is: 100 The minimum grade is: 70
Expert Answer:
Related Book For
Financial and managerial accounting
ISBN: 978-1118016114
1st edition
Authors: Jerry J. Weygandt, Paul D. Kimmel, Donald E. Kieso
Posted Date:
Students also viewed these computer engineering questions
-
Mazlin Limited purchased a machine on account on April 2, 2018, at an invoice price of $360,000. On April 4, it paid $2,000 for delivery of the machine. A one-year, $4,000 insurance policy on the...
-
The following selected transactions were completed during June between Schnaps Company and Brandy Company: June 2 Schnaps Company sold merchandise on account to Brandy Company, $14,000, terms FOB...
-
The following selected transactions were completed during November between Sallis Company and Byce Company: Nov. 2. Sallis Company sold merchandise on account to Byce Company, $12,500, terms FOB...
-
Various statistical software packages tend to provide different measures of association. Use statistical software to calculate the Goodman-Kruskal gamma, Somers D, or Kendalls tau-a for the space...
-
Hockey Apparel Providers, Inc. provided the following information for the current year. Simplified Income Statement Amount Sales$ 2,452,000 Cost of Goods Sold (251,000) Depreciation Expense....
-
Roy and Brandi are engaged and plan to get married. During 2016, Roy is a full-time student and earns $9,000 from a part-time job. With this income, student loans, savings, and nontaxable...
-
In the ammonia synthesis reaction \(\mathrm{N}_{2}+3 \mathrm{H}_{2}=2 \mathrm{NH}_{3}+22.4 \mathrm{kcal}\), the formation of \(\mathrm{NH}_{3}\) will be favoured by (a) High temperature (b) Low...
-
Iceland, Inc., is a fast-growing ice-cream maker. The company's new ice-cream flavor, Cherry Star, sells for $9 per pound. The standard monthly production level is 300,000 pounds, and the standard...
-
Carrie enjoyed observing wildlife in natural habitats. She wanted to be able to hide at a distance but observe wildlife close up in a variety of circumstances. She visited five different shops and...
-
Madetoja Oys job-costing system has two direct-cost categories: direct materials and direct manufacturing labour. Manufacturing overhead (both variable and fixed) is allocated to products on the...
-
In the short run, the supply curve of a firm operating in a competitive market is a. Determined externally. b. The part of the CM on AVC. c. Horizontal.
-
In the past 25 years, there have been several attempts by US politicians to codify a requirement for zero government deficits into law. In the mid-1990s, for example, Congress considered a 'balanced...
-
Simplify the following expression completely: (4x) (9x) Answer:
-
what extent does situational leadership impact the success of project-based teams, and what specific situational variables should leaders consider when deciding on the most appropriate leadership...
-
How can leaders foster an environment of psychological safety and trust to encourage innovation and creativity, and what role does effective communication play in sustaining such an environment over...
-
Victory Company uses weighted average process costing. The company has two production processes. Conversion cost is added evenly throughout each process. Direct materials are added at the beginning...
-
Create the following programs to fit the scenario provided. Every door and window have a single action solenoid (open when energized, closed, and locked when de energized You will include your house...
-
To help you become familiar with the accounting standards, this case is designed to take you to the FASBs Web site and have you access various publications. Access the FASBs Web site at...
-
Presented below is the format of the worksheet using the perpetual inventory system presented in Appendix 5A. Indicate where the following items will appear on the worksheet: (a) Cash, (b) Inventory,...
-
Schopp Inc. has been manufacturing its own shades for its table lamps. The company is currently operating at 100% of capacity, and variable manufacturing overhead is charged to production at the rate...
-
Plano Company has the following cash balances: Cash in Bank $15,742, Payroll Bank Account $5,000 and Plant Expansion Fund Cash $45,000. Explain how each balance should be reported on the balance...
-
An electronic instrument is to be isolated from a panel that vibrates at frequencies ranging from \(25 \mathrm{~Hz}\) to \(35 \mathrm{~Hz}\). It is estimated that at least 80 percent vibration...
-
An exhaust fan, having a small unbalance, weights \(800 \mathrm{~N}\) and operates at a speed of \(600 \mathrm{rpm}\). It is desired to limit the response to a transmissibility of 2.5 as the fan...
-
The armature of a variable-speed electric motor, of mass \(200 \mathrm{~kg}\), has an unbalance due to manufacturing errors. The motor is mounted on an isolator having a stiffness of \(10 \mathrm{kN}...
Study smarter with the SolutionInn App