Using C++. Declare an int array List of size 5. Input five numbers in the array...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Using C++. Declare an int array List of size 5. Input five numbers in the array List. Input an integer N. Find out if N is in List. If N is found in the list, then display its index and how many times it was found in List, otherwise output that N was not found. Sample Input / Output: Enter 5 values: 4 1 20 4 7 Enter a number: 4 4 was found at index: 0, 3 4 was found in the array List 2 time (s). Enter 5 values: 10 20 5 4 9 Enter a number: 20 20 was found at index: 1 20 was found in the array List 1 time (s). Enter 5 values: 10 20 5 3 60 Enter a number: 65 65 was not found in the array List. Using C++. Declare an int array List of size 5. Input five numbers in the array List. Input an integer N. Find out if N is in List. If N is found in the list, then display its index and how many times it was found in List, otherwise output that N was not found. Sample Input / Output: Enter 5 values: 4 1 20 4 7 Enter a number: 4 4 was found at index: 0, 3 4 was found in the array List 2 time (s). Enter 5 values: 10 20 5 4 9 Enter a number: 20 20 was found at index: 1 20 was found in the array List 1 time (s). Enter 5 values: 10 20 5 3 60 Enter a number: 65 65 was not found in the array List.
Expert Answer:
Answer rating: 100% (QA)
C include using namespace std int main int List5 int N Input five numbers into the array List cout Enter 5 values for int i 0 i 5 i cin Listi Input an integer N cout Enter a number cin N Find if N is ... 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
-
Harris Company manufactures and sells a single product. A partially completed schedule of the company's total costs and costs per unit over the relevant range of 59,000 to 99,000 units is given...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Michael went to the balcony of the hotel room. A warm gust of wind blew in his face - Michael shrank and smoothed his tousled red hair. Ahead splashed two seas, the Mediterranean and the Aegean,...
-
The reconciling item in a bank reconciliation that will result in an adjusting entry by the depositor is: (a) outstanding checks. (b) deposit in transit. (c) a bank error. (d) bank service charges.
-
Review Examples 4 and 6 in the text. In both examples, the taxpayer's AGI is $129,400 even though in Example 6 there is $700 of nonrecaptured 1231 loss from 2015. Explain why the two AGI amounts are...
-
Identify any weak¬nesses revealed by the statement of cash flows of Sunshine Fruit, Inc. Sunshine Fruit, Inc. Statement of Cash Flows For the Current Year Operating activities Net income 104,000...
-
The following selected accounts and balances appear on the adjusted trial balance for Ray Service, Inc., on December 31, 2010: 1. What is the net income or net loss? 2. What is the change in Retained...
-
What auction design features reduce the winners curse and therefore reduce strategic underbidding?
-
Solve the logarithmic equation for x. (Enter your answers as a comma-separated list.) log3(x+3)-log3(x-3)= 3
-
List three main departures that the U.C.C. made from the common law of contracts. Also explain all of these.
-
It is assumed that the supervisor spends time in proportion of no.of units produced. Calculate the cost of each unit of the products under: a)Traditional Costing b) ABC Costing M/s Priya Industries...
-
An ultrasonic thickness gauge (UTG) uses ultrasound waves to determine the thickness of solid materials. Figure 7 shows the UTG on a copper block of thickness x. Figure 7 copper block UTG. ultrasound...
-
Spin Cycle Architecture uses three activity pools to apply overhead to its projects. Each activity has a cost driver used to allocate the overhead costs to the projects. The activities and related...
-
4. (10 points) Write a method body for the Natural Number instance method whose contract is given below. Note that this is a restores-mode parameter. For full credit, you must use only one return...
-
Create a Flowchart base on this :Dg = 1 5 0 ; Vd = 5 0 ; ke = 0 . 4 ; ka = 1 . 6 ; % % % answer for part a ) t = 0 ; count = 1 ; % values for Cp array index while ( t < 1 0 ) Cp ( count ) = ( ( Dg *...
-
Sheridan Inc. has the following transactions during August of the current year. Indicate (a) the effect on the accounting equation and (b) the debit-credit analysis: (For Column A, List the entries...
-
Presents the concept of auditing using an analogy that involves buying a house and hiring a house inspector. Name three desirable qualities of a house inspector and discuss how those qualities apply...
-
If there is an unrealized holding gain on available-for-sale investments, it is reported as?
-
Scott Butterfield is self-employed as a CPA. He uses the cash method of accounting, and his Social Security number is 644-47-7833. His principal business code is 541211. Scott's CPA practice is...
-
Sally hires a maid to work in her home for $250 per month. The maid is 25 years old and not related to Sally. During 2012, the maid worked 10 months for Sally. a. What is the amount of Social...
-
Dr. George E. Beeper is a single taxpayer. He lives at 45 Mountain View Dr., Apt. 321, Spokane, WA 99210. Dr. Beeper's Social Security number is 775-88-9531. Dr. Beeper works for the Pine Medical...
-
The beam is constructed from two boards fastened together at the top and bottom with three rows of nails spaced every \(8 \mathrm{in}\). If an internal shear force of \(V=800 \mathrm{lb}\) is applied...
-
The beam is constructed from two boards fastened together at the top and bottom with three rows of nails spaced every 8 in. If each nail can support a \(300-\) lb shear force, determine the maximum...
-
The double-web girder is constructed from two plywood sheets that are secured to wood members at its top and bottom. If each fastener can support \(600 \mathrm{lb}\) in single shear, determine the...
Study smarter with the SolutionInn App