C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 6.2, Problem 1E
Program Plan Intro

Program plan:

  • Include the header file and use the namespace std for standard I/O.
  • Declare the function findMax(double, double).
  • Define the main function.
  • Declare the variables to store the two double-precision value.
  • Prompt the user to enter the values and storing them.
  • Call the findMax() and storing the value returned by it.
  • Display the maximum number among the two numbers.

Program description:

The main purpose of the program is to modify the program written in exercise 6.5 so that the function findMax() returns the double-precision value to the main function. After the modification the findMax() function takes two double-precision values as the function argument and returns the largest among them.

Blurred answer
Students have asked these similar questions
using r language
r language
r language
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning