Summary In this lab, you complete a partially written C++ program that includes a function requiring multiple parameters (arguments). The program prompts the user for two numeric values. Both values...


Summary


In this lab, you complete a partially written C++ program that includes a function requiring multiple parameters (arguments). The program prompts the user for two numeric values. Both values should be passed to functions named
calculateSum(),
calculateDifference(), and
calculateProduct(). The functions compute the sum of the two values, the difference between the two values, and the product of the two values. Each function should perform the appropriate computation and display the results. The source code file provided for this lab includes the variable declarations and the input statements. Comments are included in the file to help you write the remainder of the program.


Instructions



  1. Write the C++ statements as indicated by the comments.

  2. Execute the program by clicking the Run button at the bottom of the screen.


The given file is thisvoid calculateSum(double, double);void calculateDifference(double, double);void calculateProduct(double, double);using namespace std;int main(){ double value1; double value2; cout < "enter="" first="" numeric="" value:="" ";="" cin="">> value1; cout < "enter="" second="" numeric="" value:="" ";="" cin="">> value2; // Call calculateSum // Call calculateDifference // Call calculateProduct return 0;} // End of main() function // Write calculateSum function here// Write calculateDifference function here// Write calculateProduct function here
Nov 19, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here