Need help real bad wi

-=[ was heard to say... ]=-

 In> DarkMan40 <> wrote:

 >hi all!
 >how can I write a program that reads 10 integers and keeps track of how
 >many of them have the same value as their position.Also use no more than
 >one if statement.

 In> Program Dole_in_96;
 In> uses crt; var x,y,z:integer;
 In> begin  z:=0; for x:=1 to 10 do begin read (y); if (y=x) then z:=z+1;
 In> end;
 In> writeln('The input integer and position were equal ',z,' times.');end.

 In> See if this works. I'm kinda new to programming, too. It's a blast.
 In> Good luck.    Mudgeo19

Nothing like doing the guys homework assignment for him so he passes the
class with a less than adequate understanding of the lessons and an unfair
grade, only to go out into the real world and get a job someone more
deserving and better suited might otherwise get, causing the professional
world of programmers to be filled with idiots that should only be suited
for employment in the offices of MicroS**t.

Well, it's probably not going to be quite that bad, but let's not move in
that direction...

        -- Kim Forwood --

  $           Kim Forwood  <>          %
  %         For what purpose is life, if one cannot live freely?         $

___ Blue Wave/QWK v2.20