seergiomv

ejercicio 6.1

Sep 30th, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2. #define PI 3.1415926
  3.  
  4. int main() {
  5.     float r;
  6.     printf("Introduce el radio de la esfera: ");
  7.     scanf("%f", &r);
  8.     float a, v;
  9.     a = 4*PI*(r*r);
  10.     v = 4*PI*r*r*r/3;
  11.     printf("La esfera de rafio %f tiene un área de %f y un volumen de %f", r, a, v);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment