Program that will input any four float values

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

Program: You need to prepare a program to print the given output.

You are to write a program that will input any four float values where the four variables are declared in the 'main' function and perform the following calculations:

0.   read in four float numbers. (you have to pass in the four float variables by reference).

1.   print out the four numbers and the sum of the four numbers.

2.   print out the difference between the first and second number and the difference between the third and fourth number.

3.   print out the first number raised to the second number power (pow function) and the fourth number raised to the third number power.

4.   print out the largest of the four.  (This function, you will only pass in two arguments at one time.)

5.   print out the smallest of the four.  (This function, you will only pass in two arguments at one time.)

6.   print out a running total of the four numbers.  Ex 17.243 21.775  34.488.....  (This function, you will only pass in two arguments at one time.)

Read in the subsequent three numbers:   13.243   5.532    14.713   8.126  to test your code with.

Turn in the source code and the output file.

Restrictions: You have to use functions for each one of the above. You have to pass in two or three floats into each function and pass back the results. The main program is the only place you can do couts, no couts in any function.  Your 'main' can only have couts and function calls.

Note:  For #2 above, you will call the function twice

For  #3, call twice.

For #4 & #5, you will call the function 3 times? 

You need to implement this in C++ language. You need to provide the answer as soon as possible.

Reference no: EM13704467

Questions Cloud

Write a recursive definition that reverses the elements : Write a recursive definition that reverses the elements in intArray between low and high.
Write and debug a mips program : Write and debug a MIPS program that performs the given operations - Display one of the following statements depending on if a>b, or a=b or a
Determines if the input string is a valid lock combination : Write a Java program that satisfies the given requirement - Prompts the user to input exactly nine characters, which constitute a valid lock combination.
Write a program that reads a list of integer : Write a program that reads a list of integer and stores the integers in an array and write a function compact that eliminates all zeroes from its array parameter
Program that will input any four float values : You need to prepare a program to print the given output - write a program that will input any four float values where the four variables are declared in the 'main' function and perform
Explain tap water in making up the solvent mixture : Question- Why would you not want to use tap water in making up the solvent mixture (HCI + acetone) or rinsing out the beaker
Write the proper chemical formula for the compounds : Question- Write The Proper Chemical Formula for the following compounds: Copper(II) nitrate cobalt(II) nitrate, nickel(II) nitrate, iron(III) nitrate, hydrochloric acid, ammonium hydroxide, acetone and dimethylglyoxime
Calculate the molar mass of carbohydrate : Question- A solution of 6.85 g of a carbohydrate in 100.0 g of water has a density of 1.024 g/mL and an osmotic pressure of 4.61 atm at 20.0 C/. Calculate the molar mass of carbohydrate.
How many grams of urea must be added to water : Question- How many grams of urea must be added to 658g of water to give a solution with a vapor pressure 2.50 mmHg lower than that of pure water at 30 C

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

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

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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