Помогите пожалуйста по информатике!Даю 34 БАЛЛА!
Ответы
Ответ:
Объяснение:
program xoty;
var
x : integer;
begin
for x := -4 to 4 do writeln('x= ', x , 'y= ', 8-sqr(x)/3:10:5);
end.
x= -4y= 2.66667
x= -3y= 5.00000
x= -2y= 6.66667
x= -1y= 7.66667
x= 0y= 8.00000
x= 1y= 7.66667
x= 2y= 6.66667
x= 3y= 5.00000
x= 4y= 2.66667
program FckngArray;
var
i, pr, sum, qty : integer;
x: array [1..10] of integer;
begin
pr:=1; sum:=0; qty:=0;
for i := 1 to 10 do begin write('x[',i,'] = '); readln(x[i]) end;
for i := 1 to 10 do begin
if x[i] > 0 then pr:= pr * x[i];
if x[i] < 0 then begin sum := sum + x[i]; qty := qty + 1 end;
end;
Writeln('Product of positives :',pr,' Sum of negatives : ',sum,' Qty of negatives : ',qty);
end.
x[1] = -5
x[2] = 3
x[3] = 36
x[4] = -10
x[5] = 98
x[6] = 63
x[7] = 2
x[8] = 8
x[9] = 37
x[10] = -45
Product of positives :17536 Sum of negatives : -60 Qty of negatives : 3