You are on page 1of 23

unit U51_44219044_Wawan;

interface

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

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var i: integer;
begin
label1.caption:='Wawan Adhyaksa';
label2.caption:='44219044';

begin
for i:=1 to 5 do
begin
memo1.lines.add('Pascal');
end;
end;

end;
end.

unit U52_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var i:integer;
begin
for i:=1 to 5 do
begin
memo1.lines.add(inttostr(i)+ ' ' +'pascal');

end;

end;

end.

unit U53_44219044_Wawan;

interface

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

type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var i: integer;
begin
for i:=1 to 5 do
memo1.lines.add(inttostr(i)+' '+'pascal');

end;

end.

unit U54_44219044_Wawan;

interface

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

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var a: integer;

begin
stringgrid1.Cells[0,0]:='X';
stringgrid1.cells[1,0]:='X*X';
stringgrid1.cells[2,0]:='X*X*X';
stringgrid1.cells[3,0]:='1/X';
for a:=1 to 10 do
begin
stringgrid1.Cells[0,a]:=inttostr(a);
stringgrid1.Cells[1,a]:=inttostr(a*a);
stringgrid1.Cells[2,a]:=inttostr(a*a*a);
stringgrid1.Cells[3,a]:=floattostr(1/a);
end;
end;

end.
unit U55_44219044_Wawan;

interface

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

type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var k: integer;
begin
memo1.Text:='';
for k:= 10 downto 0 do
memo1.Lines.add(inttostr(k));

end;

end.
unit U56_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var i,j: integer;
begin
memo1.Text:='';
for i :=1 to 5 do
begin
for j:=1 to 3 do
memo1.lines.add(inttostr(i)+''+inttostr(j));
end;

end;
end.

unit U57_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var i: integer;
begin
memo1.Text:='';
i := 0;
While i < 5 Do
begin
memo1.lines.Add(inttostr(i)+' '+'pascal') ;
i:=i+1;
end;

end;

end.

unit U58_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
ListBox1: TListBox;
Button2: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var
i,n,jumlah : integer;
Begin
i := 1;
jumlah:=0;
n:=strtoint(edit1.text);
While i <= n Do
Begin
jumlah:=jumlah + i;
i:= i+1;
End;
listbox1.Items.add(inttostr(jumlah));

end;

procedure TForm1.Button2Click(Sender: TObject);


begin
listbox1.clear;
end;

end.
unit U59_44219044_wawan;

interface

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

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var
c,f: real;
begin
c:=strtofloat(edit1.Text);
f:=(9/5*c)+32;
edit2.Text:=floattostr(f);
end;

end.

unit U59_44219044_wawan;

interface

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

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

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var
c,f: real;
begin
c:=strtofloat(edit1.Text);
f:=(5/9*c)-32;
edit2.Text:=floattostr(f);
end;

end.

unit U510_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation
{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var i: integer;
begin
memo1.Text:='';
i := 0;
Repeat
memo1.Lines.add('Pascal');
i := i + 1;
Until i > 5;

end;

end.

unit U511_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
ListBox1: TListBox;
Button1: TButton;
Edit1: TEdit;
Label1: TLabel;
Button2: TButton;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


var
i,n : integer;
Jumlah : real;
Begin
jumlah := 0;
i := 1;
n:=strtoint(edit1.Text);
Repeat
jumlah := jumlah + i;
i := i + 1;
Until i > n;
listbox1.Items.add(floattostr(jumlah));

end;

procedure TForm1.Button2Click(Sender: TObject);


begin
listbox1.clear;
end;

end.

procedure TForm1.Button2Click(Sender: TObject);


begin
listbox1.clear;
end;

end.
\\
unit U81_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Button1: TButton;
Panel1: TPanel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


Function Hitung(Var A,B :integer) : integer;
begin
hitung:=A+B;
end;
var
X,Y,Hasil : integer;
Begin
x:=strtoint(edit1.Text);
y:=strtoint(edit2.text);
Hasil := Hitung(x,y);
edit3.Text:=inttostr(hasil);
end;

procedure TForm1.Button2Click(Sender: TObject);


begin
close;
end;
end.

procedure TForm1.Button2Click(Sender: TObject);


begin
close;
end;
end.
unit U82_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


Function Terbesar(X,Y :real) : real;
Begin
If X>Y Then
Terbesar :=X
Else
Terbesar :=Y;
End;
Var
N1,N2 : real;
Begin
memo1.Text:='';
N1:=strtoint(edit1.Text);
N2:=strtoint(edit2.Text);
memo1.Lines.add(floattostr(terbesar(N1,N2)))
end;

procedure TForm1.FormCreate(Sender: TObject);


begin

end;

end.

unit U83_44219044_wawan;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


Function PangkatI(X:real; Y:integer) : real;
Var
Pangkat : real;
i : integer;
Begin
Pangkat := 1;
For i := 1 To Y Do
Pangkat := Pangkat * X;
PangkatI:=Pangkat;
End;
Var
A,B : integer;
Begin

A:=strtoint(edit1.Text);
B:=strtoint(edit2.Text);
edit3.Text:=(floattostr(pangkatI(A,B)))
end;
end.
unit U84_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


Function Fungsi1(x : integer): integer; Forward;
Function Fungsi2(y : integer): integer;
Begin
memo1.Text:='';
Fungsi2 := Y * 2;
End;
Function Fungsi1;
Begin
Fungsi1 := Fungsi2(x) + 5;
End;
Begin
memo1.Lines.add(inttostr(Fungsi1(3)))
end;

end.

unit U85_44219044_wawan;

interface

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

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);


Function Fungsi1(x : integer): integer;
Function Fungsi2(y : integer): integer;
Begin
Fungsi2 := Y * 2;
End;
Begin
Fungsi1 := Fungsi2(x) + 7;
End;
Begin
memo1.Text:='';
memo1.lines.add(inttostr(Fungsi1(3)));
end;

end.

You might also like