Как-то так:
program Z;
var
n, m: Byte;
begin
write('n = ');
readln(n);
m:=1;
while sqr(m)>=n do m:=m+1;
writeln('M = ', m);
end.
Задача 4-2:
program D;
var
i,n,k,a: integer;
begin
write('n = ');
readln(n);
k:=0;
for i:=1 to n do
begin
readln(a);
if a > 0 then k:=k+1;
end;
wreteln('k = ', k:0:2);
end.
Задача 4-3:
program W;
var
max, a: integer;
n: longint;
begin
write('n = ');
readln(n);
max:=10;
while n <> 0 do
begin
a:=n mod 10;
if a > max then max:=a;
n:=n mod 10;
end;
readln(max);
end.