Answer the question
In order to leave comments, you need to log in
What is wrong (Delphi)?
Form1: TForm1;
ball:integer;
type answers=array[1..9,0..3] of byte;
const otv:answers= ((0,1,0,0),(1,0,0,0),(0,1,0,0),(0,0,1,0),(0,1,0,0),(0,0,1,0),(0,0,1,0),(0,0,0,1),(1,0,0,0));
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
ball:=otv[1,radiogroup1.itemIndex]+
otv[2,radiogroup2.itemIndex]+
otv[3,radiogroup3.itemIndex]+
otv[4,radiogroup4.itemIndex]+
otv[5,radiogroup5.itemIndex]+
otv[6,radiogroup6.itemIndex]+
otv[7,radiogroup7.itemIndex]+
otv[8,radiogroup8.itemIndex]+
otv[9,radiogroup9.itemIndex];
if (ball<1) or (ball>10)
then label2.Caption:='Ответье на все вопросы!'
else
label2.caption:='Правильно ответил на '+IntToStr(ball)+' из 9-ти вопросов';
if ball=9
then label3.caption:='Молодец!Ты хорошо знаешь архитектуру Томска. :)'
else
if (ball>=4) and (ball<9)
then label3.caption:='Нормально. У тебя средние знания об архитектуре Томска.'
else label3.caption:='Плохо! Ты очень плохо знаешь архитектуру Томска"';
end;
end.
Answer the question
In order to leave comments, you need to log in
So no one can tell you anything. There are compilation errors. The compiler at the same time points to the line in which the error and writes what he does not like about it. And there are runtime errors. You launched the program, and in the process, bam - an error. If you launched the program under a debugger, then in this case you will also be shown a line with an error. First of all, you need to read and try to understand the error message, maybe you can fix it yourself. It did not work out - let's get it (error message) here. Here, they say, in the line such and such an error is such and such, please explain what this means.
Or do you mean by error that everything compiles and works, but does not do what you want? Then describe what should be, and what really happened.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question