procedure TForm17.Button1Click(Sender: TObject);
var n,a,b,c : integer;
begin
n:=strtoint(edit1.text);
for a:=1 to n do
begin
for b:=1 to a do
begin
for c:=1 to b do
begin
if (a*a)= ((b*b)+(c*c))
then
begin
Listbox1.Items.add('Triple Phytagoras adalah ' +inttostr(c)+','+
inttostr(b)+','+inttostr(a));
end;
end;
end;
end ;
end;
CONVERSATION
Subscribe to:
Post Comments
(
Atom
)
0 komentar:
Post a Comment