Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int seconds, minutes, hours;
- printf("Enter the seconds: ");
- scanf("%d", &seconds);
- hours = seconds / 3600;
- minutes = (seconds - (hours * 3600)) / 60;
- seconds = (seconds - (3600 * hours)- (minutes * 60));
- printf("Hours: %d, Minutes: %d, Seconds: %d", hours, minutes, seconds);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement