Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 822 Bytes

README.md

File metadata and controls

6 lines (5 loc) · 822 Bytes

Exercise 1.12

Modify the lissajous server to read parameter values from the URL like http://localhost:800/?cycles=20 sets the number of cycles to 20 instead of the default 5. Use the strconv.Atoi function to convert the string parameter into an integer. You can see its documentation with go doc strconv.Atoi.


練習問題1.12

リサジュー図形のサーバを修正して、URLからパラメータ値を読み取るようにしなさい。たとえば、http://localhost:800/?cycles=20などのURLによって、サイクル数をデフォルトの5ではなく20に設定するようにしなさい。文字列パラメータを整数へ変換するためにstrconv.Atoi関数を使用しなさい。その変換関数のドキュメントはgo doc strconv.Atoiで見ることができます。