Program to print smallest number and largest number entered

Assignment Help Programming Languages
Reference no: EM1369206

1. Write a C++ program; LargestSmallest.cpp; that inputs 6 real numbers from the user and finds and prints the smallest number and the largest number entered.

2. Write a program to find out and print, for a class of students, the number of families with 1, 2 ,3 ...up to 6 or more children. The data in entered by the user and consists of the number of children in each pupil's family, terminated by a 0.

3. A lecturer needs a program to calculate the average of all her students' scores and print the score and the differences from the average. Assume that the class has 5 students. Write a program which allows the teacher to enter the 5 scores and then prints the score and it's difference from the average.

4. In an election, there are 5 candidates numbered 1- 5. Each voter is allowed 2 votes: A first and second choice. The first choice gets 4 points and the second choice gets 2 points. One line of input corresponds to one voter's choices. For example, the input line: 1 2 means that, for this voter, candidate 1 is the first choice and candidate 2 is the second choice. The number of votes is unknown beforehand and data is terminated by an input line: 0 0
Write C++ code to do the following.

a. Prompt the user for two values which represent the voter's choices.
b. Check if both votes are valid candidates and store the relevant data
c. Print the number of rejected votes and the number of valid votes
d. Print the candidates and their scores and the winner.

Reference no: EM1369206

Questions Cloud

What issues related to microeconomics rather macroeconomics : Which of graphs below shows Y increasing at a decreasing rate. Which of following issues is related to microeconomics rather than macroeconomics.
Explain what the wic organization still needs : Explain what the WIC organization still needs to do [in terms of improving its target population] and what are its current goals of WIC?
What is the pressure on the guage now : On a cool morning, when the temperature is 14 degrees C, you measure the pressure in your car tires to be 30 psi. After driving 50 mi on the freeway, temperature of your tires is 52 degrees C.
Relationship in consumption expenditures and inventory : Since inventories are not a large component of GDP, how can they affect GDP so sharply explain how will the replenishment cycle affect GDP in the near future?
Program to print smallest number and largest number entered : Write C++ program; LargestSmallest.cpp; which inputs six real numbers from user and determines and prints smallest number and largest number entered.
How does tows and risk play together : How could TOWS help to manage unstable environmental issues, like government or the price of fuel and how does TOWS and risk play together?
Conclude the tension in the wire : You are driving to grocery store at 21. You are 100 from an intersection when the traffic light turns red. Presume that your reaction time is 0.75 and that your car brakes with constant acceleration. How far from the intersection are you when you ..
Analyse how continuous process flow : LEAN THINKING Analyse how continuous process flow can help an organisation to reveal waste. What advantages do lean organisations hold over traditional organisations in terms of creating value for customers?
Find problems of us banks at the end of 1980 : According to Gerald Baker, columnist for London Financial Times, November 23, 1999, "In the US, banks are, by whichever measure chosen, in unusually good shape for this stage of an expansion.

Reviews

Write a Review

Programming Languages Questions & Answers

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

  Write down the conditions which are not satisfied in program

Sequential program consists of the following five statements, S1 through S5. Considering each statement as separate process. Specify which of the three conditions is not satisfied.

  Write a report on t linux kernel programming

Write a report on  t Linux Kernel programming.  Giving a brief introduction about Linux in general, then give in details information about Linux Kernel Programming.

  Write application to count number of both odd-even integers

Write application to count number of both odd and even integers of several positive integers. Fisrt value entered specifies number of values to input from user.

  Applications in involve computing various powers of e

The transcendental number, e. Many applications in mathematics involve computing various powers of e. It can be proven that ex = 1 + x/1 + x2/2! + x3/3! + ... for all values of x. Of course, this is an infinite sum.

  Examine the boxplot

Examine the boxplot and briefly discuss the overall pattern of electricity usage for the households.

  Write program which inputs employee name

Write the program which inputs Employee Name and Tuition and prints, for each employee, Name and Rebate Amount.

  Create design of very simple racing game

Create a very simple racing game of your own design. Making a game from the ground up is a lot of effort, so let's keep things basic.

  Write function to merge contents of two sorted arrays

Write a function which will merge contents of two sorted (ascending order) arrays of type FLOAT values, use efficient bubble sort to sort two arrays first and then use merger function.

  Communicate with a pc using the rs232c serial protocol

In this assignment we will use the UART0 peripheral to communicate with a PC using the RS232C serial protocol.

  Program to overload addition operator

The class should also provide the following overloaded operator capabilities: Overload the addition operator (+) to add two Polynomials.

  Design application that gets customer account data

Design an application that gets customer account data that includes an account number, customer name, and balance due.

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