//функция y=Sin(x) на интервале [0, Pi] с шагом Pi/18
var y, x, sum: real;
count: integer;
begin
y := 0;
x := 0;
sum := 0;
count := 0;
while x
begin
y := Sin(x);
if y > 1e-10 then
begin
sum := sum + y;
count := count + 1;
end;
writeln(x:5:3, ' ', y:5:3);
x := x + Pi / 18;
end;
write('average = ', sum / count:5:3);
readln;
end.