program TMundur;
uses wincrt;
var
i, j, n, it : integer;
h, a, b, c : 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 mundur}
repeat
c:= (g(a) - g(a-h))/h;
a:= a + h;
writeln('y`',i+1,' = ',c:0:6);
i:= i + 1;
until a >= b;
Tidak ada komentar:
Posting Komentar