Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1132123
Language: PASCAL
Code:
Program mang;
uses crt;
var A:array[1..100] of integer;
i,n,Tg:integer;

Begin
clrscr;
Write('Nhap so luong phan tu cua mang, n= ');
readln(n);
for i:=1 to n do
begin
write('nhap phan tu thu ',i,' vao: ');
readln(A[i]);
end;

For i:=1 To n-1 Do
For j:=i+1 To n Do

if (a[i] -a[j])=10 or (a[j] -a[i])=10 then writeln('2 so cach nhau 10 don vi la',A[i],' ',A[j]
);

  Readln(a);
end.          
Comments: