uses crt;
var a:array[1..100]of integer;
n,i,kt:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{---------------------------xu-ly----------------------------}
kt:=0;
for i:=1 to n-1 do
if a[i]>=a[i+1] then kt:=1;
if kt=0 then writeln('day la day tang dan')
else writeln('day khong la day tang dan');
readln;
end.
uses crt;
var a:array[1..100]of integer;
n,i,kt:integer;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{---------------------------xu-ly----------------------------}
kt:=0;
for i:=1 to n-1 do
if a[i]>=a[i+1] then kt:=1;
if kt=0 then writeln('day la day tang dan')
else writeln('day khong la day tang dan');
readln;
end.
program andanh;
uses crt;
var n,i,kt:integer;
a: array [1..100] of integer;
begin
clrscr;
write('So cac phan tu: ');readln(n);
for i:= 1 to n do
begin
write('So thu ',i,' : ');
readln(a[i]);
end;
kt:= 0;
for i:= 1 to n - 1 do
if a[i] <= a[i + 1] then kt:= kt + 1;
if kt = n - 1 then
write('Day tren la day tang')
else if kt < n - 1 then
write('Day tren khong phai la day tang');
readln
end.