國立屏東商業技術學院 資訊工程系 物件導向程式設計
請查閱java.lang.Math類別
以下的練習,有部份題目會使用到Math.random()與Math.round()。
Please input year in AD: 2013 2013 AD is ROC 102.
Please input year in AD: 1911 1911 AD is ROC 0.
Please input year in AD: 2050 2050 AD is ROC 139.
Throwing the dice.... 6!
Throwing the dice.... 1!
Throwing the dice.... 2!
Throwing two dice ... One dice shows 2 and the other dice shows 6. The total score is 2 + 6 = 8.
Throwing two dice ... One dice shows 3 and the other dice shows 4. The total score is 3 + 4 = 7.
Please input the width: 5 Please input the height: 6 The area is 5 x 6 = 30.
Please input the width: 10 Please input the height: 12 The area is 10 x 12 = 120.