mark = int(input())
count = 0
if mark == 5:
count += 1
while (mark<=5 and mark>0):
print(count)
1
5
-1
mark = int(input())
count = 0
if mark == 5:
count += 1
while (mark<=5 and mark>0):
mark = int(input())
if mark == 5:
count += 1
print(count)
Ввод/Вывод:1
1
5
5
5
5
5
-1
5
problems : array [0..9] of String = ('x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10', 'x1+5=10','x1+5=10', 'x1+5=10', 'x1+5=10');
answers : array [0..9] of String = ('-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5', '-5');
var
countOfAnswers, counter: integer;
userAnswer: String;
begin
countOfAnswers := 0;
for counter:=0 to 9 do
begin
write('Введите ответ уравнения ', problems[counter], ' : ');
readln(userAnswer);
if userAnswer = answers[counter] then Inc(countOfAnswers);
end;
if countOfAnswers > 8 then writeln('Отлично')
else if countOfAnswers > 5 then writeln('Хорошо')
else writeln('Плохо');
end.