nikolas_serafini

Lista 1 - Exercício 43

May 24th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main()
  6. {
  7.     float dist,tim,v1 = 60, v2 = 90;
  8.  
  9.     printf("Entre com a distancia entre os dois carros desejada :\n"); scanf("%f",&dist);
  10.  
  11.     tim = dist/(v2-v1);
  12.  
  13.     printf("O tempo para a distancia inserido entre os carros eh de %f segundos.\n",tim);
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment