Программа 1
var n : Integer;
begin
write('n = '); readln(n);
writeln('k = ', Int(sqrt(n)):0:0);
end.
Программа 2
var number : String;
sum, i : Integer;
begin
write('numer = '); readln(number);
sum := 0;
for i := 1 to Length(number) do sum := sum + ord(number[i]) - 48;
writeln('sum = ', sum); readln;
end.
Программа 3
var n,k, i, sum : Integer;
begin
write('n = '); readln(n);
sum := 0;
for i := 1 to n do
begin
sum:= sum + i;
if sum >= n then
begin
k := i;
break;
end;
end;
writeln('k = ', k);
end.