Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #define PI 3.14
- #define AREA(r) ((4.0/3.0)*pow((r),3)*PI)
- int main()
- {
- float raio[7];
- scanf("%f", &raio[0]);
- scanf("%f", &raio[1]);
- scanf("%f", &raio[2]);
- scanf("%f", &raio[3]);
- scanf("%f", &raio[4]);
- scanf("%f", &raio[5]);
- scanf("%f", &raio[6]);
- printf("%f\n", AREA(raio[0]));
- printf("%f\n", AREA(raio[1]));
- printf("%f\n", AREA(raio[2]));
- printf("%f\n", AREA(raio[3]));
- printf("%f\n", AREA(raio[4]));
- printf("%f\n", AREA(raio[5]));
- printf("%f\n", AREA(raio[6]));
- return 0;
- }
Add Comment
Please, Sign In to add comment