掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
解の総数を表示するには? (ID:10388)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
procedure TForm1.Button1Click(Sender: TObject); var a,b:byte; c:integer; str:string; begin str:=''; for b:=19 downto 3 do for a:=b-1 downto 2 do begin c:=b*b-a*a; if (10<c) and (c<100) then str:=str + '(a:'+inttostr(a)+ ',b:'+inttostr(b)+ ') b*b-a*a='+inttostr(c)+ #13#10; end; ListBox1.Items.Text:=str; end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.