SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program v13_p6;
  2. uses crt;
  3. type
  4. mas = array [1..100] of real;
  5. var
  6. arr:mas;
  7. n,i:integer;
  8. min:real;
  9.  
  10. begin
  11. write('Aaaaeoa aeeio ianneaa: ');
  12. read(n);
  13. for i:=1 to n do
  14. begin
  15. write('Yeaiaio[',i,']: ');
  16. readln(arr[i]);
  17. end;
  18. min:=0;
  19. for i:=1 to n do
  20.  begin
  21.    if (arr[i]>=0) then
  22.    begin
  23.    min:=arr[i];
  24.    break;
  25.    end;
  26.  end;
  27.         if(min>0) then
  28.         begin
  29. for i:=1 to n do
  30. begin
  31.  
  32. if (arr[i]<min) and (arr[i]>=0) then min:=arr[i];
  33. end;
  34.  
  35. for i:=1 to n do
  36. begin
  37. if arr[i]<=0 then arr[i]:=min;
  38. end;
  39. Writeln('?acoeuoao: ');
  40. end;
  41. for i:=1 to n do
  42. write(' ',arr[i]);
  43.  
  44. 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