Write a C++ program to declare a two dimensional array X of integers of 5 rows...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C++ program to declare a two dimensional array X of integers of 5 rows and 5 columns and store in it random integers between 5 and 20 (5 points). The program should enable the user to choose from the following menu: (5 points) 1. Calculate and display the average of each column in the array. (10 points) 2. Search array X for integers that are multiple of 5 and store them in a new array Y. Display the content of Y. (10 points) 3. Create a new array Z and store in it the number of occurrences of integers stored in array X. Display the integers and their number of occurrences. (10 points) 4. Calculate and display the percentage of even integers in each row of the array. (10 points) Write a C++ program to declare a two dimensional array X of integers of 5 rows and 5 columns and store in it random integers between 5 and 20 (5 points). The program should enable the user to choose from the following menu: (5 points) 1. Calculate and display the average of each column in the array. (10 points) 2. Search array X for integers that are multiple of 5 and store them in a new array Y. Display the content of Y. (10 points) 3. Create a new array Z and store in it the number of occurrences of integers stored in array X. Display the integers and their number of occurrences. (10 points) 4. Calculate and display the percentage of even integers in each row of the array. (10 points)
Expert Answer:
Answer rating: 100% (QA)
include include For rand and srand include For time using namespace std const int rows 5 const int columns 5 Function to calculate and display the ave... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Derek will deposit $4,755.00 per year for 26.00 years into an account that earns 13.00%, The first deposit is made next year. How much will be in the account 45.00 years from today? Derek will...
-
Please do the following Matlab problem, 1.Write a for loop ranging from 3 to 5. In the loop, print the value of the loop index to the screen using fprintf in the following format: Value is n where n...
-
In Exercises 3538, evaluate C F dr. F(x, y, z) = xi + yj + zk C: r(t) = 2 cos ti + 2 sin tj + tk, 0t 2
-
Prepare a performance report for Imperial Data Devices using the budget information from Exercise 10-14 and the next performance information. During the period, Imperial produced 13,000 units and...
-
In health, body parts interact to maintain homeostasis. Illness can threaten the maintenance of homeostasis, requiring treatment. What treatments might be used to help control a patient's (a) Body...
-
Do the needs for and uses of internal and consolidated ecological accounting differ? If so, how? Are the two related?
-
CVP analysis is both simple and simplistic if you want realistic analysis to underpin your decisions, look beyond CVP analysis. Do you agree? Explain.
-
What value(s) of c, if any, will satisfy the IVT for the given function f and the given value m, on the given interval [a, b]. If there is (are) none, provide an explanation. a. f(x) = x-1, m = 2,...
-
Create a procedure named FindThrees that returns 1 if an array has three consecutive values of 3 somewhere in the array. Otherwise, return 0. The procedure's input parameter list contains a pointer...
-
2. Find the parametric equation of the line that passes through P (2, 1, 1) and .(- 2, 3, 5).
-
Evaluate. dx ((6x+4) d dx-> (Type an exact answer in terms of e.)
-
Big Bertha Company expects to produce and sell 9,000 units of a single product. Management desires an 18% return on assets of $1,750,000. The following additional company information is available:...
-
The purchase price of a bond on January 11, 2018 is $300. If the yield rate is j2 = 9.7%, how many days will it take for the dirty price to be at least $309.5.
-
Fiscal flexibility means the ability of a country to adjust and restructure its currency to respond to unanticipated situations like economic crises. Fiscal policy such as taxation and government...
-
Consider the relation R = {A, B, C, D, E, F, G, H, I,J} and the set of functional dependencies F = {{A, B}{C}, {A} {D, E}, {B} {F}, {F}{G, H}, {D} {I, J} }. (a) Prove {A}{E, I} holds by using...
-
Given the reaction: 2NH3(g) + 3O2(g) 2NO(g) + 3H2O(g) The standard enthalpy change of formation (Hf) for NH3(g), NO(g), and H2O(g) are -46.19 kJ/mol, 90.4 kJ/mol, and -241.82 kJ/mol, respectively....
-
Les has collected stamps in his spare time for years. He purchased many of his stamps at a price much lower than the current market value. Les recently lost his job as a carpenter. Since his wife...
-
During 2012, Tom sold Sears stock for $10,000. The stock was purchased 4 years ago for $13,000. Tom also sold Ford Motor Company bonds for $35,000. The bonds were purchased 2 months ago for $30,000....
-
Charlie's Green Lawn Care is a cash basis taxpayer. Charlie Adame, the sole proprietor, is considering delaying some of his December 2012 customer billings for lawn care into the next year. In...
-
Jason and Mary are married taxpayers in 2012. They are both under age 65 and in good health. For this tax year, they have a total of $41,000 in wages and $500 in interest income. Jason and Mary's...
-
Give examples of non-current (or fixed) assets. In what circumstances would some of the items you have listed be current assets?
-
What is the difference between a non-current asset and a current asset?
-
You are given the following simplified statement of financial position of the Sandin Castle Company: a Calculate the current ratio. b Calculate the liquidity ratio. c After preparing the statement of...
Study smarter with the SolutionInn App