Write a menu-driven c program

Assignment Help C/C++ Programming
Reference no: EM13166974

Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated. The menu is shown below:

Select one of the following options:
1. Fill array with random numbers
2. Print the array
3. Search the array
4. Sort the array
5. Quit

Each time the fill option is executed, the array will be re-filled with a new random number series. The search will locate the first matching number and will print a message that a match was located and the index location where it was found. If no match was found it will print a message to indicate no matches found.
Sort, provides an ascending sort of the array numbers. User can select the "print the array" option to get the sorted print out of all array numbers.

Reference no: EM13166974

Questions Cloud

Write a matlab function newtonraphson : Write a MATLAB function newtonRaphson(fx, x0, sigfig, maxIT) that will return a root of the function f(x) near x=x0 using the Newton-Raphson method, where sigfig is the accuracy of the solution in terms of significant figures
Write a curried function to add n : Write a curried function to add N (where N is an integer) to each item of a list.
Cache access time of 20ns : Given a cache access time of 20ns, a main memory access time of 1000ns, and a cache hit ratio of 90 percent. Assuming fetches to main memory are started in parallel with look-ups in cache
Write a function that accepts an int array : The task calls for: Write a function that accepts an int array and the array's size as arguments. The function should create a copy of the array, except that the element values should be reversed in the copy. The function should return a pointer t..
Write a menu-driven c program : Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..
Guessing game : In C++ develop a "guessing game" where the computer and the user alternatively guess the value of a randomly selected secret number between 1 and 99 (or any other maximum value). Initially, the computer selects the random number, and the user make..
Discuss how olap and data warehousing technologies : Discuss how OLAP and data warehousing technologies work together in solving user problems. What are the advantages and disadvantages of the different OLAP technologies (MOLAP, ROLAP, HOLAP)?
Optimal value of the objective function : Find the optimal value of the objective function for the following problem by only inspecting its dual. (Do not solve the dual by the simplex method)
Write a method called add uneven arrays : Write a method called addUnevenArrays that takes two arrays, a and b, and returns a new array, c, with alength that is the maximum of the lengths of a and b. Each c[i] is the sum of the corresponding elementsof a and b if both elements exist.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  One or more consecutive white spaces is a delimiter

Write a function which will determine how many words are in a given string. assume that one or more consecutive white spaces is a delimiter between words.

  Complete the payroll program with following driver object

complete the payroll program with the following driver objects.

  Write a program that asks the user to enter two numbers.

Starting Out with C++ Write a program that asks the user to enter two numbers.

  Write a complete c++ program

The main program will read in a parameter value n (read this in main). Then it will call a function read2arrays (details below) to read lists of grades into two arrays, which the main program will call test1 and test2 (or some other names of your ..

  If a class is derived protected

If a class is derived protected from a base class, explain how this affects the inheritance of all public, protected, and private members of the base class by the derived class.

  Composite data types (arrays & records)

Composite data types (arrays & records) can be a problem when they are passed as parameters or returned by functions. Why?

  You will write a program that reads a text file

You will write a program that reads a text file, counts the number of words in the file, and the number of occurrences of each character. It will print to a file the number of words, and the number of occurrences of each character, as well as the ..

  Write a program that will input letters grade(a,b,c,d,f)

Write a program that will input letters grade(A,B,C,D,F), the number of which is input by the user (a maximum of 50 grades). The grades will be read into array. A function will be called five times(once for each letter grade) and will return the tota..

  Write a c++ program to choose two three-digit primes

Write a C++ program to choose two three-digit primes and an encryption exponent (3 or 17 may do nicely).

  Lu decomposition with gauss elimination

The LU decomposition with Gauss elimination and what is the physical interpretation of the elements of ? Write C++ programs for steps 2, 3, and 4.

  8-bit or 16-bit mode, and the prescaling ratio

8-bit or 16-bit mode, and the prescaling ratio. You can assume XTAL = 10M Hz or at the frequency you specify.

  Initialize an array and fill the array with the gpa values.

Write a program in java that asks user input (using a loop) for name of 10 student and the corresponding grade point averages (GPAs). Initialize an array and fill the array with the GPA values.

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