SCAR Code:
unit UnitProgramForSmartz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, xpman, StdCtrls;
type
TFrmSimpleProgramForSmartz = class(TForm)
EdtBox1: TEdit;
EdtBox2: TEdit;
BtnCalculate: TButton;
LblTheAddedNumbersAre: TLabel;
LblAddedNumbers: TLabel;
BtnTruth: TButton;
procedure BtnTruthClick(Sender: TObject); //Easter egg somewhere in the executable attached
procedure BtnCalculateClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmSimpleProgramForSmartz: TFrmSimpleProgramForSmartz;
NumberInEdtBox1 : Integer;
NumberInEdtBox2 : Integer;
CalculatedNumbers : Integer;
implementation
{$R *.dfm}
procedure TFrmSimpleProgramForSmartz.BtnCalculateClick(Sender: TObject);
begin
//Assings Number In Edit Box 1 To a variable
NumberInEdtBox1 := StrToInt(EdtBox1.Text);
//Assings Number In Edit Box 2 To a variable
NumberInEdtBox2 := StrToInt(EdtBox2.Text);
//Adds both variables together and assigns that to a new variable
CalculatedNumbers := (NumberInEdtBox1 + NumberInEdtBox2);
//Shows the new variable with the calculated numbers in a label.
LblAddedNumbers.caption := IntToStr(CalculatedNumbers);
end;
end.