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

  Write a flowchart that reads 10 integers

Write a flowchart that reads 10 integers and prints the first and the last on one line, the second and the ninth on the next line, the third and the seventh on the next line, and so forth. Sample input and the results are shown below

  Multiplexors whose control bit allows

Multiplexors whose control bit allows you to select between one of two modes right shift or left shift. Include logic to perform arithmetic shift left and arithmetic shift right . This means you must include logic to perform sign extension in ..

  Describe some ways for the firsthand knowledge

Describe some ways in which the firsthand knowledge we have of some topic goes beyond what we are able to write down in a language. What accounts for our inability to express this knowledge?

  Explain how to structure worksheet including titles

Explain how you will structure the worksheet, including the titles, column headings, and formulas to calculate the time it takes to make each size of cage.

  Under what circumstances would you want to convert a text

Why do you think you would want to count variables and words in a string? Provide an example. Under what circumstances would you want to convert a text string to a numerical data? Provide an example. provide specific examples please.

  Capacity as a systems analyst

In your capacity as a systems analyst, you may face situations in which you encounter an ethical dilemma. For example, you may be asked to design a system that supports an activity with which you personally disagree

  Write a main function, and the following functions

Write a main function, and the following functions to compute the stress and strain oa a steel rod(D) (in inches) and length(L) in inches subject to the compression load(P) of 10,000 to 1,000,000 pounds

  Design and implement a graphical user interface (gui)

Design and implement a graphical user interface (GUI) that lets a user draw geometric objects such as rectangles, circles or line segments. The geometric objects are two be "entered" with clicks of the mouse

  The lisp function length counts

The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument that counts the number of atoms that occur in a list at all levels.  Thus, the following lists will have the following A..

  Explaining ethical issues related to it

Ethics is "a set of principles of right conduct". Main ethical issues related to IT are accuracy, privacy,  property (including intellectual property), and accessibility to information.

  Impact of meals on world-ecological and economic perspective

Write about the impact that two (2) of your meals have on our world from an ecological and economic perspective.

  Microsoft project tool easy

Did you find the Microsoft Project tool easy to use? What is your best feature of the tool

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