Advertisement
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 h, r, v, s;
- printf("Radius: ");
- scanf("%f", &r);
- printf("\nHeight: ");
- scanf("%f", &h); // hundrluk
- s = 2 * pi * r* (h + r); // sahe
- v = pi * h * pow(r, 2); // hecm
- printf("Area: %f", s);
- printf("\nVolume: %f\n", v);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement