here's the new and improved code, thanks to your help
[pascal] program heads_tails;
var
HoT,
RandomNumber : integer;
begin
writeln ('This is a game of heads or tales');
writeln ('Press 1 for heads or 2 for tales');
write ('Enter 1 or 2');
writeln ('Thanks for your choice.');
Read (HoT);
RandomNumber := Random(1)+1;
if RandomNumber = HoT then
writeln ('Looks like your choice won!')
else
writeln ('Sorry! Try again.')
end.[/pascal]
I think it works, i just can't really see what's going on,
even when i when i select the user screen from the debug menu of the compiler.
Any suggestions on how to make it better than what it is?
I would appreciate to hear back from you.
Thanks
Bookmarks