Incomplete program

Consider the following program in which the statements are in the incorrect order. Rearrange the statements so that the program prompts the user to input the height and the radius of the base of a cylinder and outputs the volume and surface area of the cylinder. Format the output to two decimal places.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 

      #include <iomanip> 
      #include <cmath> 

        int main () 
           {} 

      double height; 

         cout << ”Volume of the cylinder = “ 
     <<PI * pow(radius, 2.0) * height << endl; 

       cout	<< “Enter the height if the cylinder: “; 
           cin >> radius; 
       cout	<< endl; 

    return 0; 

      double radius; 

      cout	<< “Surface area: “ 
       << 2 * radius * + 2 * PI * pow (radius, 2.0) << endl; 
    cout	<< fixed << showpoint << setprecision (2); 

      cout	<< “Enter the radius of the base of the cylinder: “; 
     cin	>> height; 
     cout << endl; 

      #include <iostream> 
     const double PI = 3.14159; 

     using namespace std;
Are we supposed to do your homework? because we dont do that here.
Topic archived. No new replies allowed.