nikolas_serafini

Lista 1 - Exercício 28

May 22nd, 2013
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main()
  6. {
  7.     float distance,volume,mcons;
  8.  
  9.     printf("Entre com a distancia percorrida : \n"); scanf("%f",&distance);
  10.     printf("Entre com o volume de combistivel consumido : \n"); scanf("%f",&volume);
  11.  
  12.     mcons = distance/volume;
  13.  
  14.     printf("O carro teve consumo medio de %f kilometros por litro.\n",mcons);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment