Guest User

Untitled

a guest
Jan 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. typedef struct texpr_horaria
  4. {
  5.         unsigned int hh; /* horas */
  6.         unsigned int mm; /* minutos */
  7.         unsigned int ss; /* segundos */
  8. };
  9.  
  10. int main()
  11. {
  12.     texpr_horaria hora;
  13.     unsigned int total;
  14.     printf ("Ingrese La Hora: (hh/mm/ss): ");
  15.     scanf ("%d %d %d", &hora.hh, &hora.mm, &hora.ss);
  16.     total = hora.hh * 3600 + hora.mm * 60 + hora.ss;
  17.     printf ("Tiempo En Segundos: %d", total);
  18.     getchar();
  19.     getchar();
  20.     return 0;
  21. }
Add Comment
Please, Sign In to add comment