Txerrinko

Dias , minutos y segundos

Aug 29th, 2011
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.38 KB | None | 0 0
  1. PROGRAM Dias,minutos y segundos;
  2.  
  3. VAR
  4.  
  5. HH,MM,hh,mm,h'h',m'm',d: integer;
  6.  
  7. BEGIN
  8.   write('Introduzca un n£mero en forma hhmm ');
  9.   readln(hh,mm);
  10.   write('Introduzca el siguiente ');
  11.   readln(h'h',m'm');
  12.  
  13.   MM:= (mm + m'm')MOD 60;
  14.   HH:= (hh + h'h')MOD 24 + (mm + m'm')DIV 60;
  15.   d:= HH DIV 24;
  16.  
  17.   writeln('El resultado es: ',d,'d°a/s',HH,'horas y',MM,'minutos');
  18.  
  19. END.
Advertisement
Add Comment
Please, Sign In to add comment