var inch:integer;
begin
writeln('* alphaues is thinking... *');
writeln;
writeln('*******************************');
for inch:=1 to 20 do
writeln('* ',inch,' inches = ',inch*2.54,' *');
writeln('*******************************');
end.
Полный текст программы:
var a: array[1..50] of Integer;
i,x,imax,j,n: Integer;
begin
for i:=1 to n-1 do
begin
imax:=i;
for j:=i+1 to n do if a[j]>a[imax] then imax:=j;
x:=a[i];
a[i]:=a[imax];
a[imax]:=x;
end;
end.
Var n,h,m,s:integer;
begin
write('n = ');
readln(n);
h:=n div (60*60);
m:=n mod (60*60) div 60;
s:=n mod 60;
write(h,':');
if m<10 then write(0);
write(m,':');
if s<10 then write(0);
writeln(s);
end.
Пример 1:
n = 86399
23:59:59
Пример 2:
n = 18125
5:02:05