program CountNumbers; var N, num, negativeCount, positiveSum: integer; begin negativeCount := 0; positiveSum := 0; write('Enter the value of N: '); readln(N); for var i := 1 to N do begin write('Enter a number: '); readln(num); if num < 0 then negativeCount := negativeCount + 1 else positiveSum := positiveSum + num; end; writeln('Number of negative numbers: ', negativeCount); writeln('Sum of positive numbers: ', positiveSum); end.
var
N, num, negativeCount, positiveSum: integer;
begin
negativeCount := 0;
positiveSum := 0;
write('Enter the value of N: ');
readln(N);
for var i := 1 to N do
begin
write('Enter a number: ');
readln(num);
if num < 0 then
negativeCount := negativeCount + 1
else
positiveSum := positiveSum + num;
end;
writeln('Number of negative numbers: ', negativeCount);
writeln('Sum of positive numbers: ', positiveSum);
end.