SHARE
TWEET

Untitled

a guest Dec 11th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.   N, temp: integer;
  3.   A      : array[1..1001] of integer;
  4. begin
  5.   readln(N);
  6.   temp := 0;
  7.   for var i := 1 to N do begin
  8.     read(A[i]);
  9.     if (A[i] > 0) then
  10.       temp := i;
  11.   end;
  12.   A[temp] := A[2];
  13.   for var i := 1 to N do
  14.      write(A[i], ' ');
  15. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top