Advertisement
Drowze

Listas Adicionais 01 Ex 07

May 18th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.64 KB | None | 0 0
  1.  /* 7.  Faça  um  programa  para  calcular  e  apresentar  o  valor do  volume  de  uma  lata  de  óleo,
  2. utilizando  a  fórmula:  V  =  3.14159  *  R  *  R  *  A,  em  que  as  variáveis:  V,  R  e  A  representam
  3. respectivamente o volume, o raio e a altura.
  4.  */
  5.  
  6. #include <stdlib.h>
  7. #include <stdio.h>
  8. #define PI 3.14159265
  9.  
  10. void main(){
  11.     float volume, raio, altura;
  12.  
  13.     printf("Calcular o volume de uma lata de óleo:\n\n");
  14.     printf("Digite o raio: "); scanf("%f",&raio);
  15.     printf("Digite o altura: "); scanf("%f",&altura);
  16.    
  17.     volume = PI * raio * raio * altura;
  18.     printf("\nVolume calculado: %.3fml\n",volume);
  19.  
  20.     system("Pause");
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement