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 program in python shell

Write a program in python shell. Convert inches into yards, feet, and inches. This time, use a variable to store the number of inches. You may use more than one variable.

  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.

  interlocking words on a Scrabble board

The board game Scrabble works by assigning points to wooden tiles that are marked with printed letters, and are arranged as interlocking words on a Scrabble board.

  Two-way set associative with 32 kb capacity and 64 byte

1. Assume a two-way set associative with 32 KB capacity and 64 bytes blocks. a. How many bits are needed to represent the index size?

  Write a console program that repeatedly prompts the user

Write a console program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed). As they enter the data

  How e-commerce is different from traditional retailing

Explain how e-commerce is different from traditional retailing? Write down some distinguishing features of digital markets and digital goods?

  Explaining advantages of ansi-tia-eia cabling standards

Discuss in scholarly detail the advantages of the ANSI/TIA/EIA cabling standards.

  Describe operating model for business process integration

Describe the chosen operating model in terms of business process integration. Compare the selected organization to the sample organizations using the chosen operating model in terms of business process integration.

  Compute a compass sense of direction in such a network

Consider a synchronous square mesh with n nodes and without any sense of direction but with a designated leader. (a) Show how to compute a compass sense of direction in such a network.

  Section on access controls

Refer to the section on Access Controls. What is the difference between "authorization" and "authentication"? What do we use to perform each of these access control functions? What are the advantages and limitations of the different approaches?

  How many instructions executed in single time slice

Machine executed average of 5000 instructions per microseconds. How many instructions could be executed in a single time slice?

  Policies and provisions to unbundled network elements

What are some of the major policies and provisions under the 1996 Act in regards to unbundled network elements (UNEs).

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