image1 image2

BUBURBULATです |WELCOME TO MY PERSONAL BLOG|数学と芸術が大好き

Tripel Pythagoras

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;

Share this:

CONVERSATION

0 komentar:

Post a Comment