Author Message

Sorry about that!  Maybe I placed a wrong question!  Yes I know the
readln!  But my question is what is the command affter getting ten
numbers - what is the command for verifying if the ten numbers belong to
odd or even?  And how can I display them in odd and even column?  Hoping
Quote:

> How do I do ... ?

> - ask user to press any cursor or function key
> - if cursor key or function is pressed, do something

Wed, 18 Jun 1902 08:00:00 GMT

Quote:
> Sorry about that!  Maybe I placed a wrong question!  Yes I know the
> readln!  But my question is what is the command affter getting ten
> numbers - what is the command for verifying if the ten numbers belong to
> odd or even?  And how can I display them in odd and even column?  Hoping
> for your kind consideration!  Thanks

for i := 1 to 10 do
begin
if odd(number[i]) then
GotoXY(10, i)
else
GotoXY(50, i);
write(number[i])
end;

--
______________________________________________________________________
The Scarlet Manuka,      |        Nitpickers' Party motto:
Pratchett Quoter At Large,  |  "He who guards his lips guards his
First Prophet of Bonni, is:  |  soul, but he who speaks rashly will

______________________________|_______________________________________

Wed, 18 Jun 1902 08:00:00 GMT

Quote:

>How do I do ... ?

>- ask user to press any cursor or function key
>- if cursor key or function is pressed, do something

There seems to be a certain amount of cross-talk

To find out how to read cursor key depressions (or any
other key) you should consult Prof. T. Salmi's Pascal FAQs,
posted in this forum once every week. Question 3 in

KlausL

Wed, 18 Jun 1902 08:00:00 GMT
Thank you very much!
Quote:

> > Sorry about that!  Maybe I placed a wrong question!  Yes I know the
> > readln!  But my question is what is the command affter getting ten
> > numbers - what is the command for verifying if the ten numbers belong to
> > odd or even?  And how can I display them in odd and even column?  Hoping
> > for your kind consideration!  Thanks

> for i := 1 to 10 do
>   begin
>     if odd(number[i]) then
>       GotoXY(10, i)
>     else
>       GotoXY(50, i);
>     write(number[i])
>   end;

> --
> ______________________________________________________________________
>      The Scarlet Manuka,      |        Nitpickers' Party motto:
>   Pratchett Quoter At Large,  |  "He who guards his lips guards his
>  First Prophet of Bonni, is:  |  soul, but he who speaks rashly will

> ______________________________|_______________________________________

Wed, 18 Jun 1902 08:00:00 GMT

 Page 1 of 1 [ 4 post ]

Relevant Pages