C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
bartleby

Videos

Question
Book Icon
Chapter 6.2, Problem 6E

(a)

Program Plan Intro

To definethe function surfarea(double r, double l) that returns the side surface area of cylinder by using the below formula: -

  S=2Πrlristheradiusandlisthelengthofcylinder

(b)

Program Plan Intro

Program plan:

  • Import the header file and use the namespacestd.
  • Declare the function surfarea(double r, double l).
  • Define the main function.
  • Declare the variables to store the radius and length.
  • Prompt the user to enter the radius and length of the cylinder.
  • Call the function surfarea() and displaying the value returned by it.
  • Define the function surfarea() that takes radius and length of the cylinder as the function arguments and returns the side surface area of the cylinder.
  • Declare the variable to store the side surface area of cylinder.
  • Calculate the side surface area.
  • Return the side surface area.

Program description:

The main purpose of the program is to implement the function written in Exercise 6a into the main function and test the function to get the appropriate output.

Blurred answer
Students have asked these similar questions
I would like to know the main features about the following three concepts: 1. Default forwarded 2. WINS Server 3. IP Security (IPSec).
map the following ER diagram into a relational database schema diagram. you should take into account all the constraints in the ER diagram. Underline the primary key of each relation, and show each foreign key as a directed arrow from the referencing attributes (s) to the referenced relation.   NOTE: Need relational database schema diagram
What is business intelligence? Share the Business intelligence (BI) tools you have used and explain what types of decisions you made.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License