SHARE
TWEET

Untitled

a guest Jan 18th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program Project2;
  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,a,b,c: Integer;
  12. begin
  13.   SetLength(arr, 15);
  14.   a:=0;
  15.   b:=0;
  16.   c:=0;
  17.   for i:= 1 to 15 do
  18.   begin
  19.     arr[i]:= RandomRange(-10, 10);
  20.     Writeln('Элемент - ', arr[i]);
  21.     if(arr[i] < 0) then Inc(a);
  22.     if(arr[i] < 0) then b:= b + arr[i];
  23.     if(arr[i] > 0) then c:= c + arr[i];
  24.   end;
  25.   Writeln('Сумма отр. - ', b);
  26.   Writeln('Кл-во отр. - ', a);
  27.   Writeln('Сумма полож. - ', c);
  28.   Readln;
  29. 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