Write a program that stores numbers in the given range

Assignment Help Programming Languages
Reference no: EM132211455

Question: Write a program that stores numbers from the range 0 - 1000 in an array.

Your program should

Create an array of size 50

Run in two modes and ask the user which mode they want to run in

(T)est Mode: store the numbers 1 though 50 into the array,

(P)roduction Mode - Fill the array with a file called numbers.txt

Ask the user for a number, validate that it is in the range of the array numbers, then

Call the following function

The function accepts 3 arguments - the array, the size of the array and the user number. It should then print the location (index) and the value of all numbers larger than the user's number.

In test mode the numbers in the array are limited to being filled with 1 through 50, and the user input is limited to 1 through 50

In production mode the program will fill the array from a file filled with unknown numbers from the file numbers.txt, and limit the user test number to the range 0-1000

Note: You will need other functions in my program I ended up with 2 other functions. Make sure your function matches the description above, the others can be as you design them

Make sure you check for input ranges on inputs.

You will find attached an executable to run showing the program output, and a numbers.txt to use with your program.

number.txt file 721 37 620 577 85 536 598 291 125 631 76 639 677 423 321 877 266 796 670 613 436 223 83 316 647 786 844 163 835 64 921 425 419 648 67 48 956 595 236 254 447 211 943 877 256 951 680 196 111 484

Reference no: EM132211455

Questions Cloud

Write a program that requests a floating point number : Write a program that requests a floating point number then separately outputs the integer and fractional components.
Write a program that simulates the rolling of two dice : Write a program that simulates the rolling of two dice. The program should use rand to roll the first die and again use it to roll the second die.
Write a program that repeatedly asks the user to type : Write a program that repeatedly asks the user to type in a sentence and press Enter. Your program will store each sentence the user types into some container.
Write a program that searches for a particular item : Write a program that searches for a particular item in a huge random array and see how long it take, using linear and binary searches.
Write a program that stores numbers in the given range : Write a program that stores numbers from the range 0 - 1000 in an array. Your program should. Create an array of size 50. Run in two modes and ask the user.
Write a program that solves the coin row problem : Write a program that solves the Coin Row problem in the C++ language. Your program should ask a user for the number of coins and coin values.
Write a program that reads ten numbers from the screen : Write a program that reads 10 numbers from the screen, calculates the mean (average), finds the minimum and maximum values, and outputs them to the screen.
Create a list of these numbers and find the arithmetic mean : Write a program for: In a text file INPUT integers separated by a space, perhaps in a few lines.
Write a program that reads a file of dna data : Write a program that reads a file of DNA data and searches for protein sequences. DNA data consists of long strings of the letters A,C,G, and T.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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