2 câu trả lời
uses crt,math;
var n,x,ans:qword;
i:longint;
begin
clrscr;
write('Nhap x va n: '); read(x,n);
for i:=2 to n do inc(ans,x ** i);
writeln(ans);
readln; readln;
end.
program bai_giai;
uses crt;
var x,n,i:integer;
S,t:int64;
begin
clrscr;
write('Nhap n: '); readln(n);
write('Nhap x: '); readln(x);
S:=0; t:=x;
for i:=2 to n do
begin
t:=t*x;
S:=S+t;
end;
write('S = ',s);
readln;
end.