Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- typedef struct texpr_horaria
- {
- unsigned int hh; /* horas */
- unsigned int mm; /* minutos */
- unsigned int ss; /* segundos */
- };
- int main()
- {
- texpr_horaria hora;
- unsigned int total;
- printf ("Ingrese La Hora: (hh/mm/ss): ");
- scanf ("%d %d %d", &hora.hh, &hora.mm, &hora.ss);
- total = hora.hh * 3600 + hora.mm * 60 + hora.ss;
- printf ("Tiempo En Segundos: %d", total);
- getchar();
- getchar();
- return 0;
- }
Add Comment
Please, Sign In to add comment