2013-08-21から1日間の記事一覧

PHPで等差数列を書いてみた。

PHP

初項、公差、項数をフォーム入力してその等差数列の和と表を作ってみました。 入力送信側のファイル:arithmetical.php <h1>等差数列</h1> <form action="arithmeticalAnswer.php" method="get"> <p>初項:<input type="text" size="5" maxlength="5" name="firstTerm"><span>(3桁まで)</span></p> <p>公差:<input type="text" size="5" maxlength="5" name="tolerance"><span>(3桁まで)</span></p></form>