Var
n:integer;
a:real;
begin
writeln('введите число и степень');
readln(a,n);
writeln('степень : ', exp(ln(a)*n));
writeln('корень: ',exp(ln(a)*(1/n)));
end.
Ответ:
program pred;
var
n, i, s: Integer;
begin
Write ('Введите N: ');
ReadLn (n);
s := 0;
i := 1;
while i <= n do begin
if i mod 2 = 0 then
s := s + i;
Inc (i);
end;
WriteLn ('Сумма = ', s);
ReadLn;
end.
- - - - - - - - - - - - - -
program post;
var
n, i, s: Integer;
begin
Write ('Введите N: ');
ReadLn (n);
s := 0;
i := 1;
repeat
if i mod 2 = 0 then
s := s + i;
Inc (i);
until i > n;
WriteLn ('Сумма = ', s);
ReadLn;
end.