(Practice) Write a C++
first second
16 18 23 24 52 77
54 91 11 16 19 59
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
C++ for Engineers and Scientists
- (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?arrow_forwardQ) Write a program to count the palindromic array elements from the group of 30 array elements where array is allocated memory dynamically (Only Using C++)arrow_forward1) Write a C++ Program to Multiply Two Matrix Using Multi-dimensional Arrays. You can use int or double 2D array and takes it input from user. This program takes two matrices of order r1*c1 and r2*c2 respectively. Then, the program multiplies these two matrices (if possible) and displays it on the screen, please take input from user.arrow_forward
- Nonearrow_forwardConsider the following code and answer the questions. ( C programming ) int ary[] = {5, 9, 4, 2, 6, 7, 8, 4}; Q A: What is the starting index of ary Q B: What is the last index of ary Q C: Write statement to print all array values in reverse order of the array. Write your answers below:arrow_forward1-Write a C++ program to delete duplicate elements from array. How to remove duplicateelements from array in C++ programming. After performing delete operation the arrayshould only contain unique integer value. Logic to delete duplicate elements from array.ExampleInputInput array elements: 10, 20, 10, 1, 100, 10, 2, 1, 5, 10OutputAfter removing all duplicate elementsElements of array are: 10, 20, 1, 100, 2, 5arrow_forward
- c++ programme(look at images) An organization would like to store in an array up to 100 donations. A donation is a floating-point value. Write a program which reads donations and stores them into an array which is capable of only holding 100 floats. A value of -1 can be used to terminate the input. A sample run would be:Enter donation: 50.00Enter donation: 20.00Enter donation: 95.00Enter donation: -1As a result the array of donations would look like:Given this, using an additional array of 100 float pointers, sort the contents of the donations arrays without actually moving any data in the donations array.To do this, each element of the array of pointers should be pointing to the corresponding element of the donations array.Once this has been done, simply reorder the pointers to point to the elements of the donations array in ascending order. Your pointers array should look like this:Print out the collection of numbers sorted using the pointers arrayarrow_forwarduse C codearrow_forwardUse C languagearrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr