C++ please This problem tests your ability to perform basic operations on a 1 dimensional array. Create
Fantastic news! We've Found the answer you've been seeking!
Question:
C++ please
Transcribed Image Text:
This problem tests your ability to perform basic operations on a 1 dimensional array. Create a program that reads 10 integers from the keyboard (you do not need to prompt for them). Store these integers in a one dimensional array of ints. Next check each integer to see if it is divisible by 2; if it is then change the value to 1, if it isn't change it to 0. Finally print out the array in reverse order. As an example, if the input values were: 1, 3, 4, 6, 7, 8, 9, 10, 12, 14 your program should convert the values in the array to 0, 0, 1, 1, 0, 1, 0, 1, 1, 1 and then print the sequence in reverse: 1, 1, 1, 0, 1, 0, 1, 1, 0, 0. Here is some example input and output that shows formatting... Sample Input 1 2 3 4 5 6 7 8 9 10 Sample Output 1 0 1 0 1 0 1 0 1 0 Additional Assumptions • You may assume the user enters valid integers. This problem tests your ability to perform basic operations on a 1 dimensional array. Create a program that reads 10 integers from the keyboard (you do not need to prompt for them). Store these integers in a one dimensional array of ints. Next check each integer to see if it is divisible by 2; if it is then change the value to 1, if it isn't change it to 0. Finally print out the array in reverse order. As an example, if the input values were: 1, 3, 4, 6, 7, 8, 9, 10, 12, 14 your program should convert the values in the array to 0, 0, 1, 1, 0, 1, 0, 1, 1, 1 and then print the sequence in reverse: 1, 1, 1, 0, 1, 0, 1, 1, 0, 0. Here is some example input and output that shows formatting... Sample Input 1 2 3 4 5 6 7 8 9 10 Sample Output 1 0 1 0 1 0 1 0 1 0 Additional Assumptions • You may assume the user enters valid integers.
Expert Answer:
Answer rating: 100% (QA)
Question CODE 1 include 2 using namespace std 3 4 main function 5 int main 6 7 8 9 ... View the full answer
Related Book For
Research Methods for Business A Skill Building Approach
ISBN: 978-1119942252
6th edition
Authors: Uma Sekaran, Roger Bougie
Posted Date:
Students also viewed these marketing questions
-
In an applied research context you do not need to explain the relationships between the variables in your conceptual model. Discuss this statement.
-
In an applied research context you do not need to explain the relationships between the variables in your conceptual model. Discuss this statement. (2-3 paragraphs).
-
If a number is divisible by 2 and 3, then the number is divisible by 6. Determine whether the statement is true or false. Modify each false statement to make it a true statement.
-
In recent years, Avery Transportation purchased three used buses. Because of frequent turnover in the accounting department, a different accountant was in charge of selecting the depreciation method...
-
Refer to Exercise 10.76 and find a 99% confidence interval for the difference between the mean wing lengths of the two subspecies.
-
A local area network (LAN) is best described as a(n) a. computer system that connects computers of all sizes, workstations, terminals, and other devices within a limited proximity. b. system that...
-
The story of a corporate turnaround attributed to the efforts of a visionary manager is an example of ____________. (a) a saga (b) a foundation myth (c) internal integration (d) a latent cultural...
-
Keener Incorporated had the following transactions occur involving current assets and current liabilities during February 2014. Additional information: 1. As of February 1, 2014, current assets were...
-
3 g(x)=et X -5- + -5 0 5 -5- powered by desmos () Compare the functions f(x) = x7 and g(x) = e shown in red and blue respectively in the graph above. By zooming in and out, view the functions using...
-
This Mini Practice Set will help you review all the key concepts of the account- ing cycle for a merchandising company along with the integration of payroll. Betty Loeb took over the business now...
-
Sheridan Co. uses a periodic inventory system. Its records show the following for the month of May, in which 75 units were sold. Units Unit Cost Total Cost May 1 Inventory 34 $12 $408 15 Purchases 25...
-
South Korean entertainment is (K-pop, K-drama etc.) is helping to increase the North American demand for Korean goods more broadly. 1. Consider the following questions: Imagine that one month ago...
-
1. The velocity of a particle at t = 2 s is 50 m/s ; at t = 6 s, it is 50 m/s . Calculate the average acceleration during the time interval. 2. A motorcycle accelerates at 1.6 m/s2 to reach a...
-
The current stock price is selling for $64 and has a dividend growth rate of 2%. Investors require a rate of return of 12%. What would you expect the annual dividend to be? Please ensure that you are...
-
Question 1: (30 marks) (a) Loss amounts under a class of insurance policies follow an exponential distribution with mean 100. The insurance company wishes to enter into an individual excess of loss...
-
Considering the case of Van Orden v. Perry, To what extent do you think Supreme Court Justices are able to divorce their personal religious beliefs from how they see a challenge based on religious...
-
Dawson Toys, Limited, produces a toy called the Maze. The company has recently created a standard cost system to help control costs and has established the following standards for the Maze toy:...
-
You are thinking of investing in one of two companies. In one annual report, the auditors opinion states that the financial statements were prepared in accordance with generally accepted accounting...
-
Compare your service quality measure to the measure of Zeithaml, Parasuraman, and Berry (1988) presented in Journal of Retailing. a. How does your measure differ from this measure in terms of...
-
One way to deal with discrepancies found in the data obtained from multiple sources is to average the figures and take the mean as the value on the variable. What is your reaction to this?
-
What activities are involved in getting the data ready for analysis?
-
Henri Jacque, an arbitrager with Bank of Montreal, faces the following Canadian dollar/U.S. dollar quotes: Henri Jacque is authorized to use C \(\$ 20,000,000\) or its U.S. dollar equivalent. The...
-
Ayako Miyake is a currency arbitrager for Atsugi Bank in Kanagawa. The spot rate this morning is \( 110.60 / \mathrm{S}\), and early indications are the 90 -day interest rates in the United States...
-
The computer screen in a foreign exchange trading room shows the following: a. Express all the above quotations on an outright basis. b. You want to buy Mexican pesos three-months forward with pounds...
Study smarter with the SolutionInn App