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:
| unit Quizu;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;
type TForm1 = class(TForm) BitBtn1: TBitBtn; BitBtn2: TBitBtn; BitBtn3: TBitBtn; Panel1: TPanel; Label1: TLabel; Panel2: TPanel; GroupBox1: TGroupBox; CheckBox1: TCheckBox; CheckBox2: TCheckBox; CheckBox3: TCheckBox; procedure BitBtn1Click(Sender: TObject); procedure BitBtn3Click(Sender: TObject); procedure BitBtn2Click(Sender: TObject);
private public end;
const Max=6; var Form1: TForm1; Frage: Array [1..Max] of string; Antwort: Array [1..Max, 1..3] of string; Richtig: Array [1..Max]of Integer; Nr: integer;
implementation
{$R *.dfm}
procedure TForm1.BitBtn1Click(Sender: TObject); begin close; end;
procedure TForm1.BitBtn3Click(Sender: TObject); begin Nr:=random(Max)+1; Label1.Caption:= Frage[Nr]; CheckBox1.Caption:= Antwort[Nr,1]; CheckBox2.Caption:= Antwort[Nr,2]; CheckBox3.Caption:= Antwort[Nr,3]; end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin Frage[1]:='Was isst das Krümelmonster aus der Sesamstraße am liebsten?'; Antwort[1,1]:='Popkorn'; Antwort[1,2]:='Lakritz'; Antwort[1,3]:='Kekse'; Richtig[1]:=3 ;
Frage[2]:='Wie nennt man ein vorgetäuschtes Foul im Fußball?'; Antwort[2,1]:='Geier'; Antwort[2,2]:='Schwalbe'; Antwort[2,3]:='Reiher'; Richtig[2]:=2 ;
Frage[3]:='Wie lautet der traditionelle Kölner Karnevalsruf?'; Antwort[3,1]:='Kölle Alaaf'; Antwort[3,2]:='Kölle Hellau'; Antwort[3,3]:='Kölle Walhalla'; Richtig[3]:= 1;
Frage[4]:='Welche Tiere benutzte Hannibal bei seinem Feldzug über die Alpen?'; Antwort[4,1]:='Lamas'; Antwort[4,2]:='Elefanten'; Antwort[4,3]:='Wasserbüffel'; Richtig[4]:= 2;
Frage[5]:='Wer übersetzt professionell Fremdsprachen?'; Antwort[5,1]:='Systemadministrator'; Antwort[5,2]:='Hotelier'; Antwort[5,3]:='Dolmetscher'; Richtig[5]:=3 ;
Frage[6]:='Welches dieser Duos hat zusammen acht Beine?'; Antwort[6,1]:='Tom und Jerry'; Antwort[6,2]:='Ernie und Bert'; Antwort[6,3]:='Asterix und Obelix'; Richtig[6]:=1 ; end;
end. |