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

  In c++, write a program that calculates 10,000 tries.

In C++, write a program that calculates 10,000 tries. These tries are based upon a rat trying to escape from a maze. Keep adding minutes until the rat is free and when he is free that is 1 try so we need 10,000. We start by randomly generating a numb..

  Prints out a multiplication table up to a specification

Create a program using C++ that prints out a multiplcation table up to a specfic limit. The code should prompt the user for the limit and then print out the table.

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Create a class called point3d

Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and he..

  A program computes and displays the number of centimeter

The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.

  Program that displays the ball at a random

Write a C++ program that displays the ball at a random location and then makes the ball move down to the bottom of the screen. When the ball reaches the bottom of the screen, it should start these actions over again, appear-ing at another random l..

  Unit conversions

Unit Conversions. The following problem generate tables of unit conversions. Include a table heading and column headings for the tables. Choose the number of decimal place based on the values to be printed.

  Make a class employee

Make a class EMPLOYEE with a name and salary. Make a class MANAGER inherit from EMPLOYEE. Add an instance field, named DEPARTMENT

  Convert celsius temperatures to fahrenheit temperatures

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

  Program that evaluates a infix expression

Program that evaluates a infix expression using stacks terminated by an equal sign. for example: (4-2)-5)/(2+1)-2))=the expression will contain single digit and the operators +, -, *,/. Make sure to consider the operator precedence.

  Write a program which accepts the total of food and drink

Write a program which accepts the total of food and drink purchased for a restaurant bill as input. The output should be adjusted bill with a sales tax of six percent 6% and a tip (gratuity) of 15%.

  File containing a series of integers is named

Assume that a file containing a series of integers is named numbers.dat and exists on the computer's disk. Design a java program that reads all the numbers stored in the file and calculates and displays on the console

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