Guest User

Untitled

a guest
Jan 9th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include "math.h"
  4.  
  5. void printSphereArea(double radius)
  6. {
  7. // A = 4 x PI x R x R
  8. }
  9.  
  10. void printSphereVolume(double radius)
  11. {
  12. // V = 4/3 x PI x R x R x R
  13. }
  14.  
  15. int main()
  16. {
  17. int x, y, z;
  18.  
  19. printf("X: ");
  20. scanf("%d", &x);
  21.  
  22. printf("Y: ");
  23. scanf("%d", &y);
  24.  
  25. printf("Z: ");
  26. scanf("%d", &z);
  27.  
  28. double radius = sqrt(x * x + y * y + z * z);
  29.  
  30. printSphereArea(radius);
  31. printSphereVolume(radius);
  32.  
  33. getch();
  34.  
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment