-
Linguagem
C
-
Descrição
Calcular o volume de uma esfera
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main (void)
{
float radio, volumen;
printf ("Digite o valor do radio: ");
scanf ("%f", &radio);
(void) getchar ();
volumen=4.0*M_PI*radio*radio*radio/3;
printf ("O valor do volumen: %g\n", volumen);
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
int main (void)
{
float radio, volumen;
printf ("Digite o valor do radio: ");
scanf ("%f", &radio);
(void) getchar ();
volumen=4.0*M_PI*radio*radio*radio/3;
printf ("O valor do volumen: %g\n", volumen);
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}