Skip to content

Instantly share code, notes, and snippets.

@santiagosilas
Created May 21, 2019 22:35
Show Gist options
  • Select an option

  • Save santiagosilas/0cb3304c00074630121ec96a1b1ac5b7 to your computer and use it in GitHub Desktop.

Select an option

Save santiagosilas/0cb3304c00074630121ec96a1b1ac5b7 to your computer and use it in GitHub Desktop.
Exercício de Fixação
#include<stdio.h>
int main(){
int entrada, horas, minutos, segundos, resto;
printf("entrada em segundos:");
scanf("%d", &entrada);
horas = entrada / 3600;
resto = entrada % 3600;
minutos = resto / 60;
segundos = resto % 60;
printf("%d = %d h %d min %d segundos\n",
entrada, horas, minutos, segundos);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment