👤

Calculati folosind instructiunea For (pascal): a^n + b^k totul supra c!. Va rog mult ajutati-ma!


Răspuns :

program Hello;

uses Math;

var i, a, b, n, k, c:integer;

s:real;

begin

s:=0;

Write('Dati a, b, n, c si k:'); read(a,b,n,c,k);

for i:=0 to n do begin

s:=s+((power(a,n)+power(b,k))/c);

end;

Writeln('S=', s:2:2);

end.