Write a c program to search a list of integers

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

Problem a: Sorting a list of integers

Write a C program to sort a list of integers both in ascending or descending order. The user should be prompted to enter the integers to be sorted and the type of sorting desired (ascending or descending). Your program will then print out the list of integers sorted according to the choice made by the user.

Algorithm

For each problem, write an algorithm and include it as a "preamble" comment in your program.

Code

Create a new project called sortlist. Create a C source file named sortlist.c

Submission

Submit the following file: sortlist.c.

Problem b: Searching a list of integers

Write a C program to search a list of integers for a particular value. The user should be prompted to enter the value to be searched for. Your program will then print out whether the value was found or not.

Algorithm

For each problem, write an algorithm and include it as a "preamble" comment in your program.

Code

Create a new project called searchlist. Create a C source file named searchlist.c

Submission

Submit the following file: searchlist.c.

Reference no: EM13327179

Questions Cloud

Which firm or firms if either should accept the project : Travel Excitement specializes in making travel reservations and promoting vacation travel. Wilderness Adventures has an aftertax cost of capital of 13 percent and Travel Excitement has an aftertax cost of capital of 11 percent.
Find the velocity of the sled at the bottom : A sled slides down a hill 45 meters high with a slope of 25o. The total mass of the sled plus contents is 247 kg. find the velocity of the sled at the bottom
Discuss the factual rationale behind the nations decision : Discuss the factual rationale behind this nation's decision to go to war with Afghanistan and Iraq after the 9/11 attacks as well as the response from the international community
Inverse demand for a monopolist''s product is given by p=300 : Inverse demand for a monopolist's product is given by P=300-6Q while the monopolist's marginal cost is given by MC=3Q. What is the profit-maximizing price for this monopolist?
Write a c program to search a list of integers : Write a C program to search a list of integers for a particular value. The user should be prompted to enter the value to be searched for. Your program will then print out whether the value was found or not.
If this monopolist engages in first-degree price discriminat : A monopolist faces demand P=400-4Qd and has constant marginal cost MC=80. If this monopolist engages in first-degree price discrimination, what would consumer surplus be?
Discuss three challenges associated with global trade : Discuss key reasons why a country should engage in global trade, and describe the control systems that can be put in place to protect domestic trade.
How much did quantum technology earn : How much did Quantum Technology earn during 2010 and what would earnings per share be if 42,700 shares of common stock were outstanding?
What is the work done by the constant force : A constant force of 23 N pulls on a 12 kg block on a horizontal surface. What is the work done by the constant force

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Analyze the time complexity and space complexity

Develop a simple prototype version of algorithm in C++. Specifically, you will build an in-place, order reversal algorithm - analyze the time complexity and space complexity of your algorithm

  Creates a bus class

write a program that creates a bus class. create a constructor that initializes the number of passengers and number of seats. declare four objects. use the default copy constructor to initialize two of the objects.

  You are to add mean, standard deviation

You are to add mean, standard deviation, and insert in order functionality to your statistics list program. Insert in order means that you will add a function called find_index that will locate the place in the array that a new value should be ins..

  Creates an array of six divsales objects

Write a program that creates an array of six DivSales objects. The program should ask the user to enter the sales for four quarters for each division. After the data are entered, the program should display a table showing the division sales for ..

  Create an employee class

Create an employee class, including two data: an employee number (type int ) and the employee's compensation (in dollars; type float). The member data should comprise an int for storing the employee number and a float for storing the employee's co..

  Write a program that find the average time spent programming

Write a program that finds the average time spent programming by a student each day over a 3 day period.

  Write a program to evaluate infix expressions

Write a program to evaluate infix expressions and summarize differences between array notation and pointer notation

  Same birthday

How likely is it that two people in one section of our class (40 students) have the same birthday ?

  Write a program that generates all the factors of a number

Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

  Inserts a node with info value x

Complete the code for a function that inserts a node with info      value x before, and a node with info value zafter,each node with      info value y in a linked list with first node pointer p.

  Write program to perform add-drop-list and update functions

Write C++ program to do add, drop, list (in last name / first name sorted order or id) and update functions. separate UI from data processing use object programming method multiple files

  Write an abstract class carbon footprint

Using an abstract class with only pure virtual functions, create three small classes unrelated by inheritance---clases Building, Car and Bicycle.

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