Use a one-dimensional c-style array to solve

Assignment Help Basic Computer Science
Reference no: EM13210185

Use a one-dimensional C-style array to solve the following problem. Read in up to 20 numbers from the keyboard, each of the numbers should be between 10 and 100, inclusive. As each number is read, add the number to the array if it is not a duplicate of a number already read. If it is a duplicate, print out the word "duplicate." You may terminate the input of numbers to the array if a zero is input. Use a function to return the value of true or false if an input number is already in the array. SAMPLE RUN Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 12 1: Your input: 12 Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 46 2: Your input: 46 Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 91 3: Your input: 91 Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 2 That number is not allowed. Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 46 46 is a duplicate Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 63 4: Your input: 63 Enter a number from 10 to 100 (zero to stop) up to 20 numbers: 0 Your list of non-duplicating numbers is: 12 46 91 63 Press any key to continue .

Reference no: EM13210185

Questions Cloud

Draw the circuit for a 2-input xnor gate : Draw the circuit for a 2-input XNOR gate using at most two tri-state elements (tri-state buffer or tri-state inverter) and one inverter.
Work with classes as reusable code : Objective: Work with classes as reusable code and random numbers. Instructions: A slot machine is a device that the user inserts money into and then pulls a lever (or presses a button).
Compute the energy required to melt : The molar heat of fusion of water is 6.02 KJ/mol. Calculate the energy required to melt 16.6g of water.
What benefits can outdoor gear from an internet presence : What should the company look for in terms of software for this project in addition to an interface with their accounting system In addition to serving as a convenience for its customers and increased sales, what other benefits can Outdoor Gear, Inc...
Use a one-dimensional c-style array to solve : Use a one-dimensional C-style array to solve the following problem. Read in up to 20 numbers from the keyboard, each of the numbers should be between 10 and 100, inclusive.
Find the minimum product of sumsexpression : Use algebraic manipulation to find the minimum product of sumsexpression for: (x1 + x3 + x4)(x1 + x2' +x3)(x1 + x2' + x3' + x4). Where ' stands for not.
Determine the maximum number : Determine the maximum number Determine the range (maximum - minimum) Displays a histogram that shows the numbers in each five-unit range.
Explain constant temperature reactor : Using the thermochemical data given for NO2 and N2O4 in class, determine the fraction of N2O4 that will dissociate into two NO2 molecules if one mole of pure N2O4 is introduced to a 10 liter constant volume,
Evaluate factors involved in making decisions about pricing : From the e-Activity, if you were a manager in a tobacco company, analyze the elasticity of demand for tobacco products. Evaluate the factors involved in making decisions about pricing tobacco products indicating which would be the most influential..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Use strong induction to show that every positive

Use strong induction to show that every positive integer n can be written as a sum of distinct powers of two, that is.

  Buy special equipment to prepare high-quality publications

buy special equipment to prepare high-quality publications itself or lease the equipment from another company. Suppose that leasing the equipment costs $240 per day. If you decide to purchase the equipment, the initial investment is 6,800, and operat..

  What is the difference between coupling and cohesion

What is the difference between coupling and cohesion? Which should be minimized and which should be maximized and what complications are imposed if one tries to implement a dynamic list using a traditional homogeneous array?

  Store configuration information on motherboard in cmos

Why do you believe the trend is to store configuration information on the motherboard in CMOS setup rather than by using jumpers or switches?

  Create two constructors

Create two constructors (default and initialization), accessor (get/set) methods, a printInfo method, a toString method, a method deposit that will increase the balance by a specified amount returning nothing.

  Problems of understanding natural languages

Briefly discussed the problems of understanding natural languages as opposed to formal programming languages and describe how the problem of traveling from one city to another could be framed as a production system. What are the states? What are the..

  Create confidence interval for proportion of all welders

Create the 95 percent confidence interval for proportion of all welders who graduated from registered welding course.

  How has configuration for connecting input-output changed

How has the configuration for connecting input/output (I/O) devices to computers on the motherboard changed since the late 1980s?

  Determine how many bit strings of length six are present

How many bit strings of length 6 are there? Describe completely. How many bit strings of length 6 are there which begin with 0 and end with a 0?

  Create an instance variable credit limit to indicate

Create another sub class CreditCustomer. Create an instance variable credit limit to indicate the maximum limit ($500). Credit customers get a markup of 2% on the order price.

  Faulty terminations and excessive horizontal wiring spans

What do you consider the single most important reason to pay attention to faulty terminations and excessive horizontal wiring spans?

  List and describe the user interface guidelines

Describe cognitive social phenomena that occur specifically to the context of the MMORPG that wouldn't happen in a face-to-face chess game.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd