Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <math.h>
- static float pi = atan(1)*4;
- int main(){
- float r, v, s;
- printf("Radius: ");
- scanf("%f", &r);
- s = 4 * pi * pow(r, 2); // sahe
- v = (3 * pi * pow(r, 3))/4; // hecm
- printf("Area: %f", s);
- printf("\nVolume: %f\n", v);
- system("pause");
- }
Add Comment
Please, Sign In to add comment