program ascii_table;
uses crt;

var x : char;

begin

clrscr;
write ('Enter a key:');
x := readkey;
writeln;
writeln;
writeln ('Ascii code: ',ord(x));
readkey;

end.