Advertisement
Raul_julian

Pedágio-[OBI]

Jun 17th, 2013
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {  
  6.     int comp_estrada, dist_ped, custo_km, val_ped, ped, km, valor;
  7.    
  8.     scanf("%d %d", &comp_estrada, &dist_ped);
  9.     scanf("%d %d", &custo_km, &val_ped);
  10.    
  11.     ped=comp_estrada/dist_ped*val_ped;
  12.     km=custo_km*comp_estrada;
  13.  
  14.     printf("%d", ped+km);
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement