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

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  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.

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