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
Information Security Risk and Vulnerability Assessment 1- Which TCP/IP protocol is used to convert the IP address to the Mac address? Explain 2-What popular switch feature allows you to create communication boundaries between systems connected to the switch3- what types of vulnerability directly related to the programmer of the software?4- Who ensures the entity implements appropriate security controls to protect an asset?         Please do not use AI and add refrence
Find the voltage V0 across the 4K resistor using the mesh method or nodal analysis. Note: I have already simulated it and the value it should give is -1.714V
Resolver por superposicion
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