I am a new student in programming and having problems in writing a game where the user will input a word, character or munber values for processing.

I will be grateful for the assistance.

Thank you.

Edward :)

Very basic but should get you started...

program game;
uses
   SysUtils;
var
   UserInput: string;
   Number: Double;
begin
   UserInput := '';
   
   Write('Enter a word, character, or number: ');
   Readln(UserInput);
   
   if TryStrToFloat(UserInput, Number) then
   begin
      WriteLn('User entered a number.');
   end
   else if Length(UserInput) = 1 then
   begin
      WriteLn('User entered a character.');
   end
   else
   begin
      WriteLn('User entered a word.');
   end;
end.

Hello Jackrabbit,

Thank you so much for the assistance.

I am trying to study what you have sent me and hope to be successful.

Thanx

Edward

hi
i am having trouble programming a game in Pascal (Deal or no Deal)
so your help would be greatly appreciated!
thank you :)

i'm not sure why you're opening threads since 2005?

create a new thread, post your code, what you can not accomplish and somebody will help you

best regards,

Look to my webpage
http://www.trsek.com/en/hry/10

Zdeno Sekerak

I am a new student in programming and having problems in writing a game where the user will input a word, character or munber values for processing.

I will be grateful for the assistance.

Thank you.

Edward :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.