PascalABC.NET 3.3
program journal;
var
sum, mark, count, n: integer;
check: boolean;
begin
sum := 0;
check := true;
count := 0;
writeln('Введите количество оценок: ');
readln(n);
if (n > 0) then begin
while (count <> n) do
begin
readln(mark);
inc(sum, mark);
if (mark < 4 ) then check := false;
inc(count);
if (count = n) then writeln('Ввод окончен!');
end;
end else writeln('Error!');
if ((check) and (sum > 0) and (n > 0)) then writeln('Ты молодец!');
end.