Rust the book が挑戦をうながしている、「摂氏華氏変換」に挑戦してみた。
I tried the "Celsius to Fahrenheit" conversion that Rust the book is encouraging us to try.
フォーカスしたこと
- modを使う
- ifではなくmatchを使う
- 正常終了を実装をする
- 摂氏←→華氏 or 終了をいつでも選択できるようにする
What I focus on
- Use mod.
- Use match instead of if.
- Implement normal termination.
- To be able to select Celsius←→Fahrenheit or normal termination at any time.
https://replit.com/@siba1015/conversion-1#src/main.rs
ご意見やレビューお待ちしてます。
I welcome your comments and reviews!!