2
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by FlamingClaw
0

Can someone give me code for hangman in watcom pascal please, thank you

i need to know how to make it so that when the person enters in a letter, it removes that letter from the actual word, that is what i am stuck on.

1
program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

const ch = 'a';

var user,temp:string;
    i:byte;

begin {main}
  temp:='';
  write('Write me a word:');
  readln(user);{catch the word...}
  {analize it,char by char}
  for i:=1 to length(user)do begin
    if user[i]<>ch then temp:=temp+user[i];
  end;
  writeln('I deleted the whole ''',ch,''' character from that string.');
  writeln('So ,the result is: ',temp);
  readln;
end.
0

This code doesnt work in watcom pascal, i need to know how it is done in watcom pascal
Like OMG!!!

0

hey,what is the "watcom" pascal?
I send a delphi code.It is working well in delphi(7 or 2006) as well as in turbo pascal 7.0(1992,I think :) )

0

watcom is the newer version on turbo
i think
LOLL

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.