Se citeste n gradul unui polinom si sirul
coeficientilor an, .. , a0. Se citeste x, sa se determine P(x).
program polinom;
p,x:real;
a:array[0..20] of
integer;
BEGIN
write('n=');readln(n);
for i:=0 to n do
begin
write('a[',i,']=');
readln(a[i]);
end;
write('x=');readln(x);
p:=0;
for i:=n downto 0 do
p:=p*x+a[i];
writeln('P(',x,')=',p:6:2);
readln;
END.