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.1, Problem 12E

(a)

Program Plan Intro

To write the template of a function named display(). This function has one argument. This function displays the value of the argument passed to the function when it is called.

(b)

Program Plan Intro

Program Plan: 

  1. valuevariable is used in the program.
  2. display() function is include in the program to compute and return the square of a number.

Program Description: The main purpose of the program is to include the function named display() in the main program. Call the function from the main () function. Test the function named display() by passing the values.

Blurred answer
Students have asked these similar questions
How should I answer the following regarding the first main function?
State whether each of the following is true or false. If false, explain why g) Definitions can appear anywhere in the body of a function.
C++ program chose the correct result for each of the following programming statements
Knowledge Booster
Background pattern image
Similar 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