nikolas_serafini

Lista 1 - Exercício 7

May 21st, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main()
  6. {
  7.     int hours,hours2,min,min2,fhour,fminu;
  8.    
  9.     printf("Entre com o tempo, em horas e minutos : (separados por espaco)\n"); scanf("%d %d",&hours,&min);
  10.     printf("Entre com o outro tempo a sem somado, em horas e minutos : (separados por espaco)\n"); scanf("%d %d",&hours2,&min2);
  11.  
  12.     fhour = hours+hours2+((min+min2)/60);
  13.     fminu = (min+min2)%60;
  14.  
  15.     printf("%d horas e %d minutos\n",fhour,fminu);
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment