Advertisement
Kisearu

Segundos para horas

Oct 8th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.35 KB | None | 0 0
  1. Program s_to_h ;
  2. var
  3. segundos, horas, minutos: integer;
  4. Begin
  5. writeln('Digite o valor inteiro em segundos:');
  6. readln(segundos);
  7. horas:= segundos div 3600;
  8. minutos:= (segundos - (horas * 3600)) div 60;
  9. segundos:= segundos - (horas * 3600) - (minutos * 60);
  10. writeln('O formato padrão em horas é: ', horas,':', minutos,':', segundos,'.');
  11. readln;
  12. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement