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.3, Problem 7E

(Electrical eng.) a. An engineer has constructed a two-dimensional array of real numbers with three rows and five columns. This array currently contains test voltages of an amplifier. Write a C++ program that interactively inputs 15 array values, and then determines the total number of voltages in these ranges: less than 60, greater than or equal to 60 and less than 70, greater than or equal to 70 and less than 80, greater than or equal to 80 and less than 90, and greater than or equal to 90.

b. Entering 15 voltages each time the program written for Exercise 7a runs is cumbersome. What method could be used for initializing the array during the testing phase?

c. How might the program you wrote for Exercise 7a be modified to include the case of no voltage being present? That is, what voltage could be used to indicate an invalid voltage, and how would your program have to be modified to exclude counting such a voltage?

Blurred answer
Students have asked these similar questions
(Written in C)   Create a payroll program to store and calculate the payroll for a small company as follows:Create an array of floats that is 4 rows and 50 columns, with the columns being the number of employeerecords stored in the array.Program parameters are as follows:Create a menu in a function menu and call it with the following options (use a do-while loop):A or a to add employee infoD or d to display employee infoT or t to display total payrollS or s to display the info of all employeesC or c to display the count of employees present in the arrayF or F to delete a recordZ or z to exit programThe information for each employee is: employee number, hours worked, pay rate per hour, taxdeduction.Option A or a:Call the function possible to check and if the index returned is 50 then output a msg saying that thearray is full. If the index returned is less than 50 the call the function add, pass to it the available index asthe third argument and the function will ask the user for one…
(python) Write a program with a user-defined function called 'clamp', which takes as an input a single integer. If the input number is negative, have the function return zero. If the value is postivie and greater than 255, have the function return 255. If the value is between 0 and 255, have the function return the number unaltered. Write a main program section that prompts the user to enter a number, recasts it to an integer, and calls the clamp function. The program should then print out the value returned by the function call.
(Use Python) The function  course_average  should calculate and return the average of the three values pass to it.  The function  main  should ask the user to enter three grades and then pass these values to the course_average  function.  This function should also display a message to the user in the format below.   For example, if the user entered 100, 90 and 95 the message would be:The average of 100 , 90 and 95 is 95

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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
CPP Function Parameters | Returning Values from Functions | C++ Video Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=WqukJuBnLQU;License: Standard YouTube License, CC-BY