uses crt;
const zn:string[16]='0123456789ABCDEF';
function DecToHex(n:longint):string;
var s:string;
begin
s:='';
while n>0 do
begin
s:=zn[n mod 16+1]+s;
n:=n div 16;
end;
DecToHex:=s;
end;
var d:longint;
begin
clrscr;
write('Число в системе 10=');
readln(d);
write(' В системе 16 =',DecToHex(d));
readln
end.