PythoNyashka

Untitled

May 16th, 2020
1,692
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var a, k, n, positive_sum, negative_multiplication, positive, negative:integer;
  2. Begin
  3.     Write ('Вводите числа') ;
  4.     positive_sum := 0; negative_multiplication:=1;
  5.     Read(a);
  6.     While a<>0 do begin
  7.         If a > 0 then
  8.         begin
  9.             positive := positive + 1;
  10.             positive_sum := positive_sum + a;
  11.         end;
  12.        
  13.         If a < 0 then
  14.         begin
  15.             negative := negative + 1;
  16.             negative_multiplication := negative_multiplication * a;
  17.         end;
  18.        
  19.         Read(a);
  20.     end;
  21.     Writeln('Положительных: ', positive);
  22.     Writeln('Отрицательных: ', negative);
  23.    
  24.     Writeln('Сумаа положительных: ', positive_sum);
  25.     Writeln('Произведение отрицательных: ', negative_multiplication);
  26. end.
RAW Paste Data