input and output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mishal
    New Member
    • Aug 2009
    • 1

    input and output

    Problem Statement: Write, compile, and execute a C++
    program to calculate the volume of a dumbbell that
    consists of 2 spheres, each being attached to each end
    of a cylindrical bar. Your program should ask the user
    to provide the radius of the sphere, the radius of the
    bar and the length of the bar. The program should
    display the resulting volume formatted to 3 decimal places.

    a) Determine the inputs and outputs.
    b) Develop a solution by providing a mathematical equation that relates the
    various inputs to the output
    c) Write an algorithm to solve the problem
    d) Carry out a hand calculation to determine the volume of a dumbbell that has rs
    = 5.0, rbar = 1.0 and lbar = 12.0. Use 3.1415926 as the value of π
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    I also read your other questions; you have to do your own homework; if we'd do it it would be cheating. When you're stuck and have a particular question we're here to help, not spoonfeed you with the answers. Good luck with your homework.

    kind regards,

    Jos (moderator)

    Comment

    Working...