Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include<math.h>
  5.  
  6.  
  7. int main()
  8. {
  9. int h1,m1,h2,m2,h3,m3,tt1,tt2,tt3;
  10.  
  11.  
  12. scanf("%i %i", &h1, &m1);
  13. scanf("%i %i", &h2, &m2);
  14. scanf("%i %i", &h3, &m3);
  15.  
  16. tt1=h1*60+m1;
  17. tt2=h2*60+m2;
  18. tt3=h3*60+m3;
  19.  
  20. if(tt1<=720){printf("v\n");}
  21. else {printf("f");}
  22.  
  23. if(tt2-tt1==192){printf("v\n");}
  24. else {printf("f");}
  25.  
  26. // 24 HORAS
  27. if(tt3-tt2==1380){printf("v\n");}
  28. else {printf("f");}
  29.  
  30. if((tt1<=720) && (tt2-tt1==192) && (tt3-tt2==1380)){printf("sucesso");}
  31. else {printf("falha");}
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement