Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6.  
  7. {
  8. double pi = 3.14;
  9.  
  10. double radius;
  11. cout << "What is the radius?:";
  12. cin >> radius;
  13.  
  14. double total = pi * radius * radius;
  15. double total2 = 2 * pi * radius;
  16. double total3 = (4/3) * pi * radius * radius * radius;
  17. double total4 = 4 * pi * radius * radius;
  18.  
  19. cout << "Area of circle=" << total <<
  20. cout << "Circumference of circle=" << total2 <<
  21. cout << "Volume of sphere=" << total3 <<
  22. cout << "Surface area of sphere=" << total4 <<
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement