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