//Язык Pascal
Program multiplication;
Var
code, rightAnswers, mistakes, answersCount, value1, value2, answer: integer;
Begin
Randomize;
code := 1;
rightAnswers := 0;
mistakes := 0;
answersCount := 0;
while code = 1 do
begin
Write('Проверим? ');
Readln(code);
Writeln();
if (code = 1) then
begin
value1 := random(1, 9);
value2 := random(1, 9);
Write(value1, '*', value2, ' = ');
Readln(answer);
if (answer = value1 * value2) then
begin
Writeln('Правильно!');
rightAnswers := rightAnswers + 1;
end
else
begin
Writeln('Неправильно!');
mistakes := mistakes + 1;
end;
answersCount := answersCount + 1;
Writeln();
end;
end;
Writeln('Статистика:');
Writeln('Задано вопросов: ', answersCount);
Writeln('Количество правильных ответов: ', rightAnswers);
Writeln('Число ошибок: ', mistakes);
End.