Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include "math.h"
- void printSphereArea(double radius)
- {
- // A = 4 x PI x R x R
- }
- void printSphereVolume(double radius)
- {
- // V = 4/3 x PI x R x R x R
- }
- int main()
- {
- int x, y, z;
- printf("X: ");
- scanf("%d", &x);
- printf("Y: ");
- scanf("%d", &y);
- printf("Z: ");
- scanf("%d", &z);
- double radius = sqrt(x * x + y * y + z * z);
- printSphereArea(radius);
- printSphereVolume(radius);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment