Q:

creating a simple multiple choice quiz program or a test

I am trying to make a simple quiz program with 30 questions (15 multiple choice) and have the order of all questions randomized. It also must calculate the result as a percent and display the questions answered wrongly with the correct answer. Even just a sample with 3 or 4 example questions would be fine. 
I don't want the same question appearing more than once. Is there any free source code I can download so that I learn how to do this nicely. I am just a newbie and I really want to learn and see the tactics used.
I managed to do this, it is reading the questions from a text file but I would like to modify it to display the username and the scores of previous users, I would appreciate a modification to my program or if anyone with a source code for the simple quiz program I will appreciate.
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,Unit2, StdCtrls, Grids;

type
  TForm1 = class(TForm)
    Button1: TButton;
    StringGrid1: TStringGrid;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

var
namefile, tmp : string;
f: text;
l,i,j,c: integer;
cc: double;
mas: array [1..100] of integer;

procedure TForm1.Button1Click(Sender: TObject);
begin
  reset(f);
  readln(f,l);
  for I := 1 to l do
  begin
    Form2.Label1.Caption := 'Вопрос № '+Inttostr(i+1);
     readln(f,tmp);
     Form2.Label2.Caption := tmp;
     readln(f,tmp);
     Form2.RadioButton1.Caption := tmp;
     readln(f,tmp);
     Form2.RadioButton2.Caption :=tmp;
     readln(f,tmp);
     Form2.RadioButton3.Caption :=tmp;
     readln(f,tmp);
     Form2.RadioButton4.Caption :=tmp;
     readln(f,j);

     Form2.ShowModal;

     if (Form2.RadioButton1.Checked) then
           if (j=1) then
              mas[i]:=1;
     if (Form2.RadioButton2.Checked) then
           if (j=2) then
              mas[i]:=1;
     if (Form2.RadioButton3.Checked) then
           if (j=3) then
              mas[i]:=1;
     if (Form2.RadioButton4.Checked) then
           if (j=4) then
              mas[i]:=1;
  end;
  c:=0;
  for I := 1 to l do
    if mas[i]=1 then
      c:=c+1;
  cc:=(c*100)/l;

  label3.Caption:= 'Правильных ответов '+FloatToStr(cc)+'%';

  for I := 0 to l-1 do
     stringgrid1.Cells[i,1]:=IntToStr(mas[i+1]);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  namefile:='test.txt';
  AssignFile(f, namefile);
  reset(f);
  readln(f,l);
  stringgrid1.ColCount:=l;
  for I := 1 to l do
    mas[i]:=0;
  for I := 0 to l-1 do
     stringgrid1.Cells[i,0]:=IntToStr(i+1);
  for I := 0 to l-1 do
    stringgrid1.Cells[i,1]:=IntToStr(mas[i+1]);
end;

end.

A:

To partially answer:
If you want to maintain user scores your best bet to make progress on this level is to make a second text file for maintaining user names and scores.
Read them into an array. Ask the user name at program start, run the quiz, see if you already know him, update the array, write it back.
Your next step would be to learn database access and store all data in a database instead of text files.
That should give you enough exercise for now ;-)
Like Toon said, please ask specific questions here: I want this, tried this (here's the code), this fails, how to solve?
Also, once you have a working program, you may want to put it up on https://codereview.stackexchange.com/ to ask for improvements.
StackOverflow is not the place for that.

