Program tt;
Var a:array [1..100] of integer;
N,B:integer;
Begin
Read(n);
For i:=1 ton do
Read(a[i]);
B:=a[1];
A[1]:=a[2];
A[2]:=b;
B:=a[n];
A[n]:=a[n-1];
A[n-1]:=b;
write(a[i],’,’);
End.
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Program tt;
Var a:array [1..100] of integer;
N,B:integer;
Begin
Read(n);
For i:=1 ton do
Read(a[i]);
B:=a[1];
A[1]:=a[2];
A[2]:=b;
B:=a[n];
A[n]:=a[n-1];
A[n-1]:=b;
For i:=1 ton do
write(a[i],’,’);
End.