Write a C++ program that has an array containing 10 integers. Create a loop to allow...
Fantastic news! We've Found the answer you've been seeking!
Question:
![Write a C++ program that has an array containing 10 integers. Create a loop to allow the user to enter values](https://dsd5zvtm8ll6.cloudfront.net/questions/2023/12/6572e5d545f09_1702118728463.jpg)
Transcribed Image Text:
Write a C++ program that has an array containing 10 integers. Create a loop to allow the user to enter values into the array. Set a pointer to the array and ask the user for an element number, then print the value in that element of the array using the pointer. Next, print the next two values in the array using the same pointer. (For example, if the user enters element 5, the program needs to show the values stored in the fifth, sixth and seventh elements. Lastly, ask the user for a value and use a linear search to report if the value is stored in some element in the array or not. Write a C++ program that has an array containing 10 integers. Create a loop to allow the user to enter values into the array. Set a pointer to the array and ask the user for an element number, then print the value in that element of the array using the pointer. Next, print the next two values in the array using the same pointer. (For example, if the user enters element 5, the program needs to show the values stored in the fifth, sixth and seventh elements. Lastly, ask the user for a value and use a linear search to report if the value is stored in some element in the array or not.
Expert Answer:
Answer rating: 100% (QA)
The c Program include include int main Create an array of 10 integers int arr10 Ask the user to ente... View the full answer
Related Book For
Posted Date:
Students also viewed these computer network questions
-
1 . Specific tariffs are A ) import taxes stated in specific legal statutes. B ) import taxes calculated as a fixed charge for each unit of imported goods. C ) import taxes calculated as a fraction...
-
Goodwill impairment tests are carried out annually. During 2014, goodwill impairment was determined to be $26,000 on the parents share of goodwill and $5,000 on the NCI share. In 2016, impairment in...
-
+3 NE + .. 4 b) A Spade or Club? .. +4 As shown above, a classic deck of cards is made up of 52 cards, 26 are black, 26 are red. Each color is split into two sults of 13 cards each (clubs and...
-
Governmental Funds Statement of Revenues Expenditures and Changes in Fund Balance. You have recently started working as the controller for a small county. The county is preparing its financial...
-
Work through the simplex method (in algebraic form) step by step to solve the model in Prob. 4.1-4.
-
Bob Cleary, the controller of Mountain-Pacific Railroad, has prepared the following financial statements for 1996 and 1997. The market prices of the companys stock as ofJanuary 1, 1996, December 31,...
-
Web-based exercise. Go to the Bureau of Labor Statistics Web site and find the most recent index number for the cost of college tuition. You can find this by conducting a public-data query. Go to the...
-
Mike Samson is a college football coach making a base salary of $652,800 a year ($54,400 per month). Employers are required to withhold a 6.2% Social Security tax up to a maximum base amount and a...
-
Since monetary policy changes through the fed funds rate occur with a lag, policymakers are usually more concerned with adjusting policy according to changes in the forecasted or expected inflation...
-
Jones Contractors Inc. agreed to construct a building for $425,000. Construction commenced in 2018 and was completed in 2020. Data relating to the contract are summarized below. (Click the icon to...
-
After further negotiation Roger and Benedicta agreed to use standard preferred stock after all. In her counter-offer, however, Benedicta has proposed that her shares pay cumulative non-cash dividends...
-
Use the Empirical Rule to answer the questions below: The distribution of weights for newborn babies is approximately normally distributed with a mean of 7.5 pounds and a standard deviation of 0.6...
-
Assessment Coversheet Unit/s assessed FNSTPB503 Apply Legal Principles in Contract and Consumer Law Assessment name FNSTPB503 Assignment Type of Assessment This summative assessment will enable your...
-
Question 1 (35 Points) A soil profile is provided below. The estimated stresses from a spread footing overlying a 10 meter thick normally consolidated clay layer are: 180.0 kN/sq m (top of the clay...
-
Hales Inc, 6% bonds. Wang Corporation purchased $100,000 g et par in 2020 with the intent and ability to hold the bonds until he bonds mature in 2025, so Wang classified its investment as...
-
The nitrogen atoms in N2 participate in multiple bonding, whereas those in hydrazine, N2H4, do not. (a) Draw Lewis structures for both molecules. (b) What is the hybridization of the nitrogen atoms...
-
Write an application that allows a user to select a country from a list box that contains at least seven options. After the user makes a selection, display the countrys capital city. Save the file as...
-
A collection of data stored on a nonvolatile device in a computer system is____________. A. An application B. A file C. Volatile D. A type of binary file
-
All Java programming statements must end with a ____________. a. Period b. Comma c. Closing parenthesis d. Semicolon
-
40. The City of Pfeiffer starts the year of 2008 with the General Fund and an enterprise fund. The General Fund has two activities: education and parks/recreation. For convenience, assume that the...
-
41. Use the information in problem 40 to prepare the 2008 fund-based financial statements for the gov ernmental funds and the proprietary funds. A statement of cash flows is not required. Assume that...
-
37. The County of Maxnell decides to create a sanitation department and offer its services to the pub lic for a fee. As a result, county officials plan to account for this activity within the...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App