Skip to content

Instantly share code, notes, and snippets.

@newtoallofthis123
Created January 13, 2023 07:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
C calculator for Hashnode Article
#include <stdio.h>
int main(int argc, char const *argv[])
{
int seconds, minutes, hours;
scanf("%d", &seconds);
hours = seconds / 3600;
minutes = (seconds % 3600) / 60;
seconds = (seconds % 3600) % 60;
printf("%d:%d:%d", hours, minutes, seconds);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment