Var i:Integer;
A:array[1..10] of Integer ;
Begin
For i:=1 to 10 do begin
A[i]:=random(26)-5;
Write(A[i], ' ') ;end;
Writeln;
If A[i]<0 then A[i]:=abs(A[i])
Else A[i]:=-A[i];
Write(A[i], ' ') end;
End.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Var i:Integer;
A:array[1..10] of Integer ;
Begin
For i:=1 to 10 do begin
A[i]:=random(26)-5;
Write(A[i], ' ') ;end;
Writeln;
For i:=1 to 10 do begin
If A[i]<0 then A[i]:=abs(A[i])
Else A[i]:=-A[i];
Write(A[i], ' ') end;
End.