Kod: Zaznacz cały
program pochodna;
var a,b,n,i:integer;
begin
write('Podaj wspolczynnik przy x ');
readln(a);
write('Podaj potege x ');
readln(b);
write('Podaj ktora pochodna chcesz policzyc ');
readln(n);
i:=1;
while i<=n do
begin if a=0 then writeln(0) else
if b=0 then if n<1 then writeln(a) else
writeln(0) else
if b=1 then if n<1 then if a=1 then writeln('x') else
writeln(a,'x') else
if n=1 then writeln(a) else
writeln(0) else
a:=a*b;
b:=b-1;
i:=i+1;
end;
writeln(a,'x^',b);
readln;
end.