C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 9PP

(Data processing) Your professor has asked you to write a C++ program that determines grades at the end of the semester. For each student, identified by an integer number between 1 and 60, four exam grades must be kept, and two final grade averages must be computed. The first grade average is simply the average of all four grades. The second grade average is computed by weighting the four grades as follows: The first grade gets a weight of 0.2, the second grade gets a weight of 0.3, the third grade gets a weight of 0.3, and the fourth grade gets a weight of 0.2. That is, the final grade is computed as follows:

0.2   *   g r a d e 1   +   0.3   *   g r a d e 2   +   0.3   *   g r a d e 3   +   0.2   *   g r a d e 4

Using this information, construct a 60-by-7 two-dimensional array, in which the first column is used for the student number, the next four columns for the grades, and the last two columns for the computed final grades. The program’s output should be a display of the data in the completed array. For testing purposes, the professor has provided the following data:

Chapter 7, Problem 9PP, (Data processing) Your professor has asked you to write a C++ program that determines grades at the

Blurred answer
Students have asked these similar questions
## MP (Machine Problem) Details The bulls and cows game is a code-breaking game designed for two or more players. Each player chooses a secret code of 4 digits from 0 – 9. The digits must be all different. The goal of the game is for each player to guess the other player's secret code. The players in turn present their guesses to the opponents. The opponents respond by telling the players: 1. The number of bulls, i.e. the number of matching digits in their right positions, and 2. The number of cows, i.e. the number of matching digits but in different positions. ### Requirements The main goal of this assignment is to develop the bulls and cows game that allows a single player to play interactively against the computer. The game stores two secret codes, one from the player and one from the computer. The player and the computer will try to guess each other’s secret code. Both the player and the computer only have seven attempts for guessing the secret code. If the player enters invalid…
((Simulation: The Tortoise and the Hare) In this problem, you’ll re-create one of the truly great moments in history, namely the classic race of the tortoise and the hare. You’ll use random number generation to develop a simulation of this memorable event. Our contenders begin the race at square 1 of 70 squares. Each square represents a possible position along the race course. The finish line is at square 70. The first contender to reach or pass square 70 is rewarded with a pail of fresh carrots and lettuce. The course weaves its way up the side of a slippery mountain, so occasionally the contenders lose ground. Use variables to keep track of the positions of the animals (i.e., position numbers are 1–70). Start each animal at position 1 (i.e., the “starting gate”). If an animal slips left before square 1, move the animal back to square 1. Generate the percentages in Fig. 10.24 by producing a random integer i in the range 1 ≤i ≤10. For the tortoise, perform a “fast plod” when 1 ≤i…
(True or False) Seven different positive integers are randomly chosen between 1 and 2022 (including 1 and 2022).There must be a pair of these integers has a difference that is a multiple of 6.

Chapter 7 Solutions

C++ for Engineers and Scientists

Ch. 7.2 - (Practice) Write array declarations, including...Ch. 7.2 - (Data processing) Write an array declaration...Ch. 7.2 - (Data processing) Write a program that uses an...Ch. 7.2 - (Electrical eng.) Write a program that stores the...Ch. 7.2 - (Practice) a. Write a declaration to store the...Ch. 7.3 - (Practice) Write specification statements for the...Ch. 7.3 - (Desk check) Determine the output produced by the...Ch. 7.3 - (Practice) a. Write a C++ program that adds the...Ch. 7.3 - (Practice) Write a C++ program that adds...Ch. 7.3 - Prob. 5ECh. 7.3 - (Electrical eng.) a. An engineer has constructed a...Ch. 7.4 - Prob. 1ECh. 7.4 - Prob. 2ECh. 7.4 - Prob. 3ECh. 7.4 - Prob. 4ECh. 7.4 - Prob. 5ECh. 7.4 - (Electrical eng.) Write a program that declares...Ch. 7.4 - (Statistics) Write a program that includes two...Ch. 7.5 - Prob. 1ECh. 7.5 - (Practice) Run Program 7.10 to determine the...Ch. 7.5 - Prob. 3ECh. 7.5 - (List maintenance) a. Write a complete C++ program...Ch. 7.5 - Prob. 5ECh. 7.5 - (List maintenance) The following letters are...Ch. 7.5 - (File creation) Write a C++ program that creates...Ch. 7.5 - Prob. 8ECh. 7.5 - Prob. 9ECh. 7.5 - Prob. 10ECh. 7.5 - Prob. 11ECh. 7.5 - Prob. 12ECh. 7.5 - Prob. 13ECh. 7.5 - Prob. 14ECh. 7.5 - Prob. 15ECh. 7.6 - Prob. 1ECh. 7.6 - Prob. 2ECh. 7.6 - Prob. 3ECh. 7.6 - Prob. 4ECh. 7.6 - Prob. 5ECh. 7.6 - Prob. 6ECh. 7.6 - Prob. 7ECh. 7.6 - Prob. 8ECh. 7.6 - (Practice) Use the max_element and min_element...Ch. 7 - (Statistics) a. Write a C++ program that reads a...Ch. 7 - (Practice) Define an array named peopleTypes that...Ch. 7 - (Numerical) Given a one-dimensional array of...Ch. 7 - (Numerical) Write and test a function that returns...Ch. 7 - (Sorting) Read a set of numerical grades from the...Ch. 7 - (Numerical) a. Define an array with a maximum of...Ch. 7 - (Numerical) Using the srand() and rand() C++...Ch. 7 - (Statistical) In many statistical analysis...Ch. 7 - (Data processing) Your professor has asked you to...Ch. 7 - (Modify) Modify the program written for Exercise 9...Ch. 7 - Prob. 11PPCh. 7 - (Data processing) The answers to a true-false test...Ch. 7 - Prob. 13PPCh. 7 - (Data processing) Construct a three-dimensional...Ch. 7 - (Computation) A magic square is a square of...Ch. 7 - (Computation) Among other applications, Pascal’s...
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License