Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- int input, intHour, intMin, intSec;
- printf("Give me a number: ");
- scanf("%d", &input);
- intHour = input / (3600);
- input -= intHour * 3600;
- intMin = ((input % 3600) / 60);
- input -= intMin * 60;
- intSec = ((input) % 60);
- printf("%d hour(s), %d minute(s), %d second(s)", intHour, intMin, intSec);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement