program mark3; var a,b,c,d,e,f,j,k:longint; begin randomize; j:=0; k:=0; write('Please Enter 3 numbers (1-49)'); readln(d,e,f); while (d=e)or(d=f)or(e=f)do begin write('The three numbers cannot be same.'); readln(d,e,f); end; while (j<1000) and (k=0) do begin a:=random(49)+1; b:=random(49)+1; c:=random(49)+1; j:=j+1; writeln('This is the ',j,' times and the guesses are ',a,b:3,c:3); if ((d=a)or(d=b)or(d=c)) then if ((e=a)or(e=b)or(e=c)) then if ((f=a)or(f=b)or(f=c)) then k:=1; end; if j<=1000 then writeln('It is ',j,'times.') else writeln('It is more than 1000 times.'); if k=1 then writeln('The answer is ',a,b:3,c:3); end.