SHARE
TWEET

Untitled

a guest Jan 18th, 2020 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program Project3;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. {$R *.res}
  6.  
  7. uses
  8.   System.SysUtils,System.Math;
  9.   var
  10.   arr: array of Integer;
  11.   i,max,b,c: Integer;
  12.   o: Real;
  13. begin
  14.   Randomize;
  15.   SetLength(arr, 15);
  16.   for i:= 1 to 15 do
  17.   begin
  18.     arr[i]:= RandomRange(-5, 20);
  19.     Writeln('Элемент ',i, ' = ', arr[i]);
  20.   end;
  21.   max:=arr[1];
  22.   for i:= 1 to 15 do
  23.   begin
  24.     if(arr[i] > max) then max:= arr[i];
  25.   end;
  26.   Writeln('Максимальный - ', max);
  27.   for i:= 1 to 15 do
  28.   begin
  29.     o:= arr[i] / max;
  30.     Writeln('Новый элемент ',i, ' = ', o);
  31.   end;
  32.   Readln;
  33. 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