program TPusat;
uses wincrt;
var
i, j : integer;
h, a, b, c, d, it : real;
label 1, 2, 3;
function g(y:real):real;
begin
g:= y*y + y;
end;
begin
1:
write('Masukkan jarak selang(h) : ');readln(h);
write('Masukkan batas bawah(a) : ');readln(a);
write('Masukkan batas atas(b) : ');readln(b);
writeln('');
{Solusi pusat}
repeat
c:= (g(a+h) - g(a-h))/(2*h);
if a <= b then writeln('y`',i+1,' = ',c:0:6);
a:= a + h;
i:= i + 1;
until a >= b;
Tidak ada komentar:
Posting Komentar