Professional Documents
Culture Documents
Command Volume and Area
Command Volume and Area
1.
2.
3.
4.
5.
CF140111
CF140117
CF140222
CF140093
CF140287
cout << "Calculated the Volume and Surface Area for the Cone. \n" ;
cout << "Enter the radius : " ;
cin >> radius;
cout << "Enter the height : " ;
cin >> height ;
volume = (1.0/3) *3.14*radius*radius*height ;
area = 3.14*radius*radius + 3.14*radius*height ;
cout << "\nThe volume of a Cone with radius and height "
<< " is " << volume << endl ;
cout << "\nThe surface area of a cone with radius and height "
<< " is " << area << endl ;
cout << "-------------------------------------------------------------\n" ;
cout << "Please press any key to exit... " << endl;
getch();
}