Taylis69
26.11.2022 19:13

Вкоде где-то ошибка.тест. var form2: tform2; ball: integer; type answers=array[1..15,0..3]of byte; const otv: answers=(0,1,0,,0,,0,0,,0,1,0,,0,1,,0,1,,0,1,,,0,,0,1,,0,,0,1,,0,1,,1,,0,1,0)); implementation {$r *.dfm} procedure tform2.btn1click(sender: tobject); begin ball: =otv[1,rg1.itemindex]+ otv[2,rg2.itemindex]+ otv[3,rg3.itemindex]+ otv[4,rg4.itemindex]+ otv[5,rg5.itemindex]+ otv[6,rg6.itemindex]+ otv[7,rg7.itemindex]+ otv[8,rg8.itemindex]+ otv[9,rg9.itemindex]+ otv[10,rg10.itemindex]+ otv[11,rg11.itemindex]+ otv[12,rg12.itemindex]+ otv[13,rg13.itemindex]+ otv[14,rg14.itemindex]+ otv[15,rg15.itemindex]+ lbl1.caption: ='правильно ответил на'+inttostr(ball)+'из 15-ти вопросов'; if ball=15 then lbl2.caption: ='молодец: )' else if (ball=5) or (ball=9) then lbl2.caption: ='не всегда был внимательный' else lbl2.caption: =' плохо: (' end; end.

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Виктория1950
07.10.2020 15:22
В задании массива констант не хватает начальной скобки
const otv:answers=(0,1,0,0),  должно быть  const otv:answers=((0,1,0,0),
в круглых скобках должно быть по 4 значения, а у Вас и по 3 и по 2 и даже 5
(   4зн  ),  (4 зн ),   . . .  (4 зн. ));
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота