Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* 7. Faça um programa para calcular e apresentar o valor do volume de uma lata de óleo,
- utilizando a fórmula: V = 3.14159 * R * R * A, em que as variáveis: V, R e A representam
- respectivamente o volume, o raio e a altura.
- */
- #include <stdlib.h>
- #include <stdio.h>
- #define PI 3.14159265
- void main(){
- float volume, raio, altura;
- printf("Calcular o volume de uma lata de óleo:\n\n");
- printf("Digite o raio: "); scanf("%f",&raio);
- printf("Digite o altura: "); scanf("%f",&altura);
- volume = PI * raio * raio * altura;
- printf("\nVolume calculado: %.3fml\n",volume);
- system("Pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement