Write a program that searches the array of up to 21 values

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

Problem  - Write a program that searches the array of up to 21 data values, in the range of 10 - 70 using a linear search. The array is filled with random numbers. A symbolic Constant should be used to establish the array size of 21. The "main" program will be used to print the heading and for declaration and to call user defined functions The main only calls functions and functions do all the work for this problem. Use <stdio.h>

The UDF1 is called from the main and will ask the user for a seed value from (1-10) to generate up to 21 random numbers in the range of 10 - 70. The numbers are used to fill the array. No check is needed for the (1-10)

The UDF2 is called from the main and will print the array of 21 random numbers in the range of 10 - 70 to the screen (console) with 7 numbers to a line.

The UDF3 is called from the main and will ask the user for a search key. The search key will be used in that same function to look for and identify the position of the key value in the array.

This same function will print to a text file (data file), the value and the position or positions of the found value or print a message stating the value and that the values was not found. The rules for the output file: The data file must have the student's lastname_keyword included in the filename. The data file should have the extension .txt. The cprogram should print a "start to the data file with name and date".

The cprogram file must open the datafile with a statement. The cprogram should print an "end to the data file with name and date". The cprogram file must close the datafile with a statement. Please see the sample files.

Students will upload a filename.c file that has a copy of the console input and a copy of the text file output, and upload a text file that has a copy of the output. Students will print and turn in a filename.c file that has a copy of the console input and a copy of the text file output, and print and turn in a copy of the text file that has a copy of the output.

Students should follow the sample output by using the inputs given and provide sample output of 2 scenarios. Use 7 and use 10 for input. One scenario is for random data with the target found and the other scenario is for random data with the target not found.

Reference no: EM132103934

Questions Cloud

Declare a struct tokenfreq that consists of two data members : You are required to use an integer vector to store the input numbers typed from the keyboard. The declaration of this vector will be in main().
New reduced heat liberation process : Show the calculations of heat (q) in support of your suggestion for a new monosaccharide to use in this new reduced heat liberation process.
What is a strong acid : What is a Strong acid? how is a strong acid is different than a concentrated acid?
How do svante arrhenius : How do Svante Arrhenius, Johannes Nicolaus Brønsted and Thomas Martin, and G.N. Lewis each define acids and bases?
Write a program that searches the array of up to 21 values : Write a program that searches the array of up to 21 data values, in the range of 10 - 70 using a linear search. The array is filled with random numbers.
How do you convert from liters to fluid liters : How do you convert from liters to fluid liters? For example, how would you determine that 3.3x10^-14L = 33fL?
What system of linear equations should be used to solve : With this problem what system of linear equations should be used to solve for with this function we create?
Outline the steps needed to solve the problem : Outline the steps needed to solve the following problem, then do the calculations. Ether, , which was originally used as an anesthetic
Draw arrows in the cells to store traceback information : Draw arrows in the cells to store traceback information. What is the score of the optimal global alignment and what alignment(s) achieves this score?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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