Program Turbo Pascal ♦se considera un nr intreg (n) sa se scrie un program turbo pascal care atribue variabilei logice t valoarea TRUE daca n apartine intervalului (-2;5) in caz contrar valoarea false
Program Augustin; var n,i:integer; t:boolean; x:array [-2..5] of integer; begin x[-2]:=-2; x[-1]:=-1; x[0]:=0; x[1]:=1; x[2]:=2; x[3]:=3; x[4]:=4; x[5]:=5; Writeln('n='); readln(n); for i:=-2 to 5 do begin if x[i]=n then t:=True; end; Writeln(t); readln; end.