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

  The program calls a function called getgrades

The program calls a function called GetGrades that will read in grades from the keyboard, the number of grades should also be input by the user.

  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..

  Provide a class diagram for every user authored class

Examine the sample code you have been provided with. This code is for a simple Car Hire management system. It contains a number of classes.

  Your program should include two functions

Your program should include two functions. Function celsius_at_depth should compute and return the Celsius temperature at a depth given in kilometers. Function fahrenheit should convert a Celsius temperature to Fahrenheit.

  Payroll and uses the selection construct

This problem involves payroll and uses the selection construct. A possible restatement: An hourly employee's regular payRate is $16.78/hour for hoursWorked

  calculates the average rainfall

Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or July, and the amount of rain (in millimeters) that fell each month.

  Businesspartner class that contains a first name

Create a BusinessPartner class that contains a first name, company name, and a telephone number. Create a Contacts class that contains a dynamically allocated array of BusinessPartners as well as the owner's name and cell phone number.

  Computing value of the return statement

In the following code snippet, what is the value of the return statement for x = 4 and n = 4? int foo(int x, int n)

  The fibonacci sequence

In the novel "The DaVinci Code", a scrambled version 13, 3, 2, 21, 1, 1, 8, 5 of the first eight Fibonacci numbers appear as one of the clues left by murdered museum curator Jacques Sauniere. In this assignment, we will do something related to t..

  How a base version of this assignment works

For this assignment you are to create an interactive moving sign in the context of a cityscape street scene. Click the link below to see how a base version of this assignment works. Type a message in the long blank slot at the top left, and then clic..

  Write a loan calculator program

Write a loan calculator program in C++ that displays monthly balances for user-specified loan terms. To be flexible, you decide to specify the loan terms in a file and provide that filename  entered from the keyboard. To keep things simple

  Write an algorithm that converts a decimal number

Write an algorithm that converts a decimal number between 0 and 15 into its 4 bit unsigned binary representation and write an algorithm that converts a linear measurement in feet and inches into meters. One inch is equivalent to 2.54 centimeters.

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