Форум программистов, компьютерный форум, киберфорум
Delphi
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.69/13: Рейтинг темы: голосов - 13, средняя оценка - 4.69
0 / 0 / 0
Регистрация: 11.11.2010
Сообщений: 6

ТЕСТ-программа для контроля знаний учеников

28.04.2012, 13:58. Показов 2417. Ответов 1
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Уважаемый програмисти, написал тест-программу для контроля знаний учеников, столкнулся с недопониманием. Надо чтобы всякий раз когда запускали дети программу вопроси шли в порядке рандома. Как это сделать??? Помогите пожалуйста! Спасибо.

Delphi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
unit Unit1;
 
interface
 
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Menus;
 
type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Bevel1: TBevel;
    MainMenu1: TMainMenu;
    a1: TMenuItem;
    N1: TMenuItem;
    N3: TMenuItem;
    N4: TMenuItem;
    Button2: TButton;
    N2: TMenuItem;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure N4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
var
  Form1: TForm1;
 
implementation
 
uses Unit2, Unit4;
 
{$R *.dfm}
 
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.Hide;
Form2.Show;
end;
 
procedure TForm1.FormCreate(Sender: TObject);
begin
Form1.Position:= poDeskTopCenter;
end;
 
procedure TForm1.Button2Click(Sender: TObject);
begin
Form1.Close;
end;
 
procedure TForm1.N4Click(Sender: TObject);
begin
form4.show;
end;
 
end.
Delphi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
unit Unit2;
 
interface
 
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;
 
type
  TForm2 = class(TForm)
    Timer1: TTimer;
    Button1: TButton;
    Label2: TLabel;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    Button7: TButton;
    Button8: TButton;
    Button9: TButton;
    Button10: TButton;
    Button11: TButton;
    Button12: TButton;
    Button13: TButton;
    Button14: TButton;
    Button15: TButton;
    Button16: TButton;
    Button17: TButton;
    Button18: TButton;
    Button19: TButton;
    Button20: TButton;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Bevel1: TBevel;
    Label1: TLabel;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    Bevel2: TBevel;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
    procedure Button7Click(Sender: TObject);
    procedure Button8Click(Sender: TObject);
    procedure Button9Click(Sender: TObject);
    procedure Button10Click(Sender: TObject);
    procedure Button11Click(Sender: TObject);
    procedure Button12Click(Sender: TObject);
    procedure Button13Click(Sender: TObject);
    procedure Button14Click(Sender: TObject);
    procedure Button15Click(Sender: TObject);
    procedure Button16Click(Sender: TObject);
    procedure Button17Click(Sender: TObject);
    procedure Button18Click(Sender: TObject);
    procedure Button19Click(Sender: TObject);
    procedure Button20Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
var
  Form2: TForm2;
  ball, ocen, num, sec, sec1, min: integer;
 
implementation
 
uses Unit1, Unit3;
 
{$R *.dfm}
 
procedure TForm2.Button1Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Âèð³á ó âèãëÿä³ òîíêî¿ ìåòàëåâî¿ íèòêè(æèëè) àáî ê³ëüêà òàêèõ æèëîê, ñêðó÷åíèõ ì³æ ñîáîþ - ?';
RadioButton1.Caption:= 'Ïðîâîëêà';
RadioButton2.Caption:= 'Ïðîâ³ä';
RadioButton3.Caption:= 'Ìîòóçêà';
 
Button1.Visible:= false;
Button2.Top:= Button1.Top;
Button2.Left:= Button1.Left;
Button2.Visible:= true;
num:= num+1;
Label3.Caption:= IntToStr(num);
 
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð:' + IntToStr(num);
end;
 
procedure TForm2.FormCreate(Sender: TObject);
begin
Form2.Position:= poDeskTopCenter;
//ball:= 0;
//num:=1;
//sec:=0;
Label2.Caption:= '';
Label3.Caption:= IntToStr(num);
Label4.Caption:= '';
Label4.Visible:= false;
Label2.Visible:= false;
Label3.Visible:= false;
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
Label6.Caption:= '';
Label6.Visible:= false;
 
end;
 
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form1.Close;
end;
 
procedure TForm2.Button2Click(Sender: TObject);
begin
if RadioButton2.Checked= true then
ball:= ball+2
else
ball:= ball;
 
 
Label1.Caption:='Ùî º ïðîâ³äíèêîì ?"?';
RadioButton1.Caption:= 'Ãóìà';
RadioButton2.Caption:= '̳äü';
RadioButton3.Caption:= 'Äåðåâî';
 
Button2.Visible:= false;
Button3.Top:= Button1.Top;
Button3.Left:= Button1.Left;
Button3.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
 
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button3Click(Sender: TObject);
begin
if RadioButton2.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Íàïðóãà ñê³ëüêîõ âîëüò ïðîò³êຠâ äîìàøí³é åëåêòðîìåðåæ³?';
RadioButton1.Caption:= '220';
RadioButton2.Caption:= '36';
RadioButton3.Caption:= '360';
 
Button3.Visible:= false;
Button4.Top:= Button1.Top;
Button4.Left:= Button1.Left;
Button4.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
 
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button4Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ïðèñòð³é ùî ïåðåòâîðþº ìåõàí³÷íó åíåðã³þ â åëåêòðè÷íó?';
RadioButton1.Caption:= 'Ãåíåðàòîð';
RadioButton2.Caption:= 'Äâèãóí';
RadioButton3.Caption:= 'Ñòàòîð';
 
Button4.Visible:= false;
Button5.Top:= Button1.Top;
Button5.Left:= Button1.Left;
Button5.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
 
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button5Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ïðèëàäè ³ ìàøèíè, ÿê³ ïðàöþþòü çà ðàõóíîê âèêîðèñòàíî¿ åëåêòðè÷íî¿ åíåð㳿 íàçèâàþòü - ?';
RadioButton1.Caption:= 'Òðàíçèñòîðàìè';
RadioButton2.Caption:= 'Òåïëîðåçèñòîðàìè';
RadioButton3.Caption:= 'Ñïîæèâà÷àìè';
 
Button5.Visible:= false;
Button6.Top:= Button1.Top;
Button6.Left:= Button1.Left;
Button6.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button6Click(Sender: TObject);
begin
if RadioButton3.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ùî íå º àëüòåðíàòèâíèì äæåðåëîì åëåêòðîåíåð㳿?';
RadioButton1.Caption:= 'Âîäà';
RadioButton2.Caption:= 'Ïîâ³òðÿ';
RadioButton3.Caption:= 'Êàì³íü';
 
Button6.Visible:= false;
Button7.Top:= Button1.Top;
Button7.Left:= Button1.Left;
Button7.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
 
end;
 
procedure TForm2.Button7Click(Sender: TObject);
begin
if RadioButton3.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ïðè ïîñë³äîâíîìó ç’ºäíàíí³ ïðîâ³äíèê³â, íà ñïîæèâà÷àõ îäíàêîâèì áóäå?';
RadioButton1.Caption:= 'U';
RadioButton2.Caption:= 'I';
RadioButton3.Caption:= 'R';
 
Button7.Visible:= false;
Button8.Top:= Button1.Top;
Button8.Left:= Button1.Left;
Button8.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button8Click(Sender: TObject);
begin
if RadioButton2.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='ßêùî ïåðåâåñòè 1 êÂò â Âò òî öå ñê³ëüêè áóäå?';
RadioButton1.Caption:= '1000';
RadioButton2.Caption:= '100';
RadioButton3.Caption:= '10000';
 
Button8.Visible:= false;
Button9.Top:= Button1.Top;
Button9.Left:= Button1.Left;
Button9.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button9Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ìàòåð³àë, ÿêèé çà ïåâíèõ óìîâ ìîæå ïðîâîäèòè åëåêòðè÷íèé ñòðóì íàçèâàºòüñÿ - ?';
RadioButton1.Caption:= 'Ïðîâ³äíèêîì';
RadioButton2.Caption:= 'ijåëåêòðèêîì';
RadioButton3.Caption:= 'Íàï³âïðîâ³äíèêîì';
 
Button9.Visible:= false;
Button10.Top:= Button1.Top;
Button10.Left:= Button1.Left;
Button10.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button10Click(Sender: TObject);
begin
if RadioButton3.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='ßêèì ïðèëàäîì âèì³ðþþòü ñèëó ñòðóìó?';
RadioButton1.Caption:= 'Âîëüòìåòðîì';
RadioButton2.Caption:= 'Àìïåðìåòðîì';
RadioButton3.Caption:= 'Ðåîñòàòîì';
 
Button10.Visible:= false;
Button11.Top:= Button1.Top;
Button11.Left:= Button1.Left;
Button11.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button11Click(Sender: TObject);
begin
if RadioButton2.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='ßêùî ïåðåâåñòè ìåãàîì â îì?';
RadioButton1.Caption:= '10000000';
RadioButton2.Caption:= '100000000';
RadioButton3.Caption:= '1000000';
 
Button11.Visible:= false;
Button12.Top:= Button1.Top;
Button12.Left:= Button1.Left;
Button12.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button12Click(Sender: TObject);
begin
if RadioButton3.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Íåðóõîìà ÷àñòèíà äâèãóíà?';
RadioButton1.Caption:= 'Ñòàòîð';
RadioButton2.Caption:= 'Ðîòîð';
RadioButton3.Caption:= 'Ãðàô³òîâ³ ù³òêè';
 
Button12.Visible:= false;
Button13.Top:= Button1.Top;
Button13.Left:= Button1.Left;
Button13.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button13Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='ßêùî ëþäèíó âðàæàº åëåêòðè÷íèì ñòðóìîì ïðè âàñ. Íåîáõ³äíî çðîáèòè…?';
RadioButton1.Caption:= '³äøòîâõíóòè ³çîëÿö³éíèì ïðåäìåòîì';
RadioButton2.Caption:= '³äøòîâõíóòè ðóêàìè';
RadioButton3.Caption:= 'Îáëèòè ëþäèíó âîäîþ';
 
Button13.Visible:= false;
Button14.Top:= Button1.Top;
Button14.Left:= Button1.Left;
Button14.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button14Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='ßêèé ³ç ïîáóòîâèõ åëåêòðîïðèëàä³â íå ïðàöþº â³ä åëåêòðèíî¿ åíåð㳿"?';
RadioButton1.Caption:= 'Ïèëîñîñ';
RadioButton2.Caption:= 'Ðó÷íà ñîêîâèæèìàëêà';
RadioButton3.Caption:= 'Òåëåâ³çîð';
 
Button14.Visible:= false;
Button15.Top:= Button1.Top;
Button15.Left:= Button1.Left;
Button15.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button15Click(Sender: TObject);
begin
if RadioButton2.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='ßêèé ç åëåìåíò³â â³äñóòí³é â áóäîâ³ áàòàðåéêè?';
RadioButton1.Caption:= 'Ãðàô³òîâèé ñòåðæåíü';
RadioButton2.Caption:= 'Öèíêîâèé ñòàêàí÷èê';
RadioButton3.Caption:= 'Ìàãí³ò ïðèðîäíèé';
 
Button15.Visible:= false;
Button16.Top:= Button1.Top;
Button16.Left:= Button1.Left;
Button16.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button16Click(Sender: TObject);
begin
if RadioButton3.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ïîò³ê åëåêòðîí³â - öå?';
RadioButton1.Caption:= 'Åëåêòðè÷íèé ñòðóì';
RadioButton2.Caption:= 'Õàîòè÷íèé ðóõ ìîëåêóë';
RadioButton3.Caption:= 'Ìàãí³òíå ïîëå';
 
Button16.Visible:= false;
Button17.Top:= Button1.Top;
Button17.Left:= Button1.Left;
Button17.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button17Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Ïðè ïàðàëåëüíîìó ç’ºäíàíí³ ñïîæèâà÷³â íåçì³ííèì º?';
RadioButton1.Caption:= 'Îï³ð';
RadioButton2.Caption:= 'Ñèëà ñòðóìó';
RadioButton3.Caption:= 'Íàïðóãà';
 
Button17.Visible:= false;
Button18.Top:= Button1.Top;
Button18.Left:= Button1.Left;
Button18.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button18Click(Sender: TObject);
begin
if RadioButton3.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='Òåìïåðàòóðíèé ä³àïàçîí ðîáîòè ìîíòàæíîãî ïðîâîäà?';
RadioButton1.Caption:= '-50  -  +105';
RadioButton2.Caption:= '+23  -  +75';
RadioButton3.Caption:= '-15  -  3';
 
Button18.Visible:= false;
Button19.Top:= Button1.Top;
Button19.Left:= Button1.Left;
Button19.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button19Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
Label1.Caption:='... - âèêîðèñòîâóºòüñÿ äëÿ ìîíòàæó åëåêòðîîáëàäíàííÿ ñõîâàíîþ àáî â³äêðèòîþ ïðîâîäêîþ ?';
RadioButton1.Caption:= 'Óñòàíîâî÷íèé ïðîâ³ä';
RadioButton2.Caption:= 'Îáìîòóâàëüíèé ïðîâ³ä';
RadioButton3.Caption:= 'Ìîíòàæíèé ïðîâ³ä';
 
Button19.Visible:= false;
Button20.Top:= Button1.Top;
Button20.Left:= Button1.Left;
Button20.Visible:= true;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
end;
 
procedure TForm2.Button20Click(Sender: TObject);
begin
if RadioButton1.Checked= true then
ball:= ball+2
else
ball:= ball;
 
num:= num+1;
Label3.Caption:= IntToStr(num);
Label2.Caption:= IntToStr(ball);
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
 
if (ball <= 40) and  (ball>= 34)
then ocen:= 5;
 
if (ball <= 32) and  (ball>= 28)
then ocen:= 4;
 
if (ball <= 26) and  (ball>= 22)
then ocen:= 3;
 
if ball < 22
then ocen:= 2;
 
Label4.Caption:= IntToStr(ocen);
 
 
Form3.Visible:= true;
Form2.Visible:= false;
 
end;
 
procedure TForm2.FormShow(Sender: TObject);
begin
Timer1.Enabled:= true;
Timer1.Interval:=1000;
 
ball:= 0;
num:=1;
sec:=0;
sec1:=0;
Label2.Caption:= '';
Label3.Caption:= IntToStr(num);
Label4.Caption:= '';
Label6.Caption:= '';
Label5.Caption:= 'Ïèòàííÿ íîìåð: ' + IntToStr(num);
Label7.Caption:= '';
Label8.Caption:='';
 
 
 
Button20.Visible:= false;
Button1.Visible:= true;
end;
 
procedure TForm2.Timer1Timer(Sender: TObject);
begin
inc(sec); //Sec ï³äâèùóºìî íà 1
inc(sec1);
  Label6.Caption:=IntToStr(sec);
  min:= Trunc(sec/60);
  Label7.Caption:= IntToStr(min);
  if sec1 >= 60 then sec1:= 0;
  Label8.Caption:= IntTostr(sec1);
end;
 
end.
Delphi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
unit Unit3;
 
interface
 
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;
 
type
  TForm3 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Bevel1: TBevel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
var
  Form3: TForm3;
 
implementation
 
uses Unit2, Unit1;
 
{$R *.dfm}
 
procedure TForm3.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form2.Close;
end;
 
procedure TForm3.FormShow(Sender: TObject);
begin
//Form3.Position:= poDeskTopCenter;
Label1.Caption:= 'ʳëüê³ñòü áàë³â: ' + Form2.Label2.Caption;
Label2.Caption:= 'Âàøà îö³íêà: ' + Form2.Label4.Caption;
Label3.Caption:= 'Òåñò ïðîéøîâ ó÷åíü: ' + #13 + Form1.Edit1.Text + ' ' + Form1.Edit2.Text;
Label4.Caption:= '×àñ ïðîõîäæåííÿ: ' + Form2.Label7.Caption + 'ìèí.' + ' ' + Form2.Label8.Caption + 'ñåê.'
end;
 
procedure TForm3.Button1Click(Sender: TObject);
begin
Form3.Close;
end;
 
procedure TForm3.Button2Click(Sender: TObject);
begin
hide;
Form1.show;
 
end;
 
end.
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
28.04.2012, 13:58
Ответы с готовыми решениями:

Обучающе-тестирующая программа для контроля знаний по английскому языку
Тема:Обучающе-тестирующая программа для контроля знаний по английскому языку.Delphi 7 И возникли вопросы по написанию отчета. 1.3....

Программа для проверки знаний учеников с использованием ф-ии random, randomize
Доброго времени суток. Вот программа на Паскале: program noobles; uses crt; var...

Программа тест для проверки знаний, может есть у кого?
Доброго времени суток! Может кто-нибудь поделиться программой для тестирования, в которой будут вопросы и несколько вариантов ответов.

1
 Аватар для Alex_pac
1302 / 708 / 107
Регистрация: 25.05.2011
Сообщений: 2,158
Записей в блоге: 51
29.04.2012, 01:05
я так понимаю бд там нету? ну тогда создайте массив с индексами по порядку, а потом его случайно перемешайте. И потом уже по значениям этого массива выводите вопросы.

Массив как быть будет содержать нужный порядок вывода вопросов, то есть в данном случае случайный порядок.

Delphi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// случайно перемешать массив
var
i, tmp, j, z: Integer; Mas: array of integer;
begin
<...>
Randomize;
for i:=0 to Length(Mas) - 1 do begin
   j:=Random(Length(Mas));
   z:=Random(Length(Mas));
   tmp:=Mas[z];
   Mas[z]:=Mas[j];
   Mas[j]:=tmp;
end;
 
end;
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
29.04.2012, 01:05
Помогаю со студенческими работами здесь

Составить программу для контроля знаний
Условие задачи: Составить программу для контроля знаний. В программе задаётся один вопрос, ответ на который включает несколько наименований...

Составить программу для контроля знаний
Здравствуйте все форумчане! Хочу еще раз поблагодарить всех кто мне уже помог, им Большое Спасибо!!! У меня в курсовой осталась одна...

Тест для проверки знаний студентов
Добрый день. помогите создать тест (или если есть что нибудь готовое похожее) для практической работы, а то из-за работы совсем времени...

Создать тест для проверки знаний по математике
За любую помощь и информацию о решении подобного рода заданий буду очень благодарна Нарушаете пункт правил 5.18 перепишите текст в пост

Разработать тест для проверки знаний по выбранной теме
Помогите написать программу, илишаблон для программы или подскажите как написать такую прогу на С#... Разработать тест для проверки...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Новые блоги и статьи
SDL3 для Web (WebAssembly): Обработчик клика мыши в браузере ПК и касания экрана в браузере на мобильном устройстве
8Observer8 02.02.2026
Содержание блога Для начала пошагово создадим рабочий пример для подготовки к экспериментам в браузере ПК и в браузере мобильного устройства. Потом напишем обработчик клика мыши и обработчик. . .
Философия технологии
iceja 01.02.2026
На мой взгляд у человека в технических проектах остается роль генерального директора. Все остальное нейронки делают уже лучше человека. Они не могут нести предпринимательские риски, не могут. . .
SDL3 для Web (WebAssembly): Вывод текста со шрифтом TTF с помощью SDL3_ttf
8Observer8 01.02.2026
Содержание блога В этой пошаговой инструкции создадим с нуля веб-приложение, которое выводит текст в окне браузера. Запустим на Android на локальном сервере. Загрузим Release на бесплатный. . .
SDL3 для Web (WebAssembly): Сборка C/C++ проекта из консоли
8Observer8 30.01.2026
Содержание блога Если вы откроете примеры для начинающих на официальном репозитории SDL3 в папке: examples, то вы увидите, что все примеры используют следующие четыре обязательные функции, а. . .
SDL3 для Web (WebAssembly): Установка Emscripten SDK (emsdk) и CMake для сборки C и C++ приложений в Wasm
8Observer8 30.01.2026
Содержание блога Для того чтобы скачать Emscripten SDK (emsdk) необходимо сначало скачать и уставить Git: Install for Windows. Следуйте стандартной процедуре установки Git через установщик. . . .
SDL3 для Android: Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 29.01.2026
Содержание блога Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами. Версия v3 была полностью переписана на Си, в. . .
Инструменты COM: Сохранение данный из VARIANT в файл и загрузка из файла в VARIANT
bedvit 28.01.2026
Сохранение базовых типов COM и массивов (одномерных или двухмерных) любой вложенности (деревья) в файл, с возможностью выбора алгоритмов сжатия и шифрования. Часть библиотеки BedvitCOM Использованы. . .
SDL3 для Android: Загрузка PNG с альфа-каналом с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 28.01.2026
Содержание блога SDL3 имеет собственные средства для загрузки и отображения PNG-файлов с альфа-каналом и базовой работы с ними. В этой инструкции используется функция SDL_LoadPNG(), которая. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru