program ex1; uses wincrt; var mone,num,mone_nums:integer;begin writeln ('enter num'); readln (num); mone:=0; mone_nums:=0; while num<>-99 do begin inc (mone); if mone=num then inc (mone_nums); writeln ('enter another num'); readln (num); end; writeln (the number of nums who were in their pos ',mone_nums); end.
|