[問題] 關於進位與隨機變數

看板java作者 (草草)時間12年前 (2012/07/08 12:58), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
System.out.println(Math.round()); System.out.println(Math.random()); 我要把以上這兩行給合併並且乘上46,該如何打? 我怎麼打都編譯失敗... System.out.println(Math.round(random()*46)); 這樣錯在哪?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 36.237.164.42

07/08 13:29, , 1F
System.out.println(Math.round(Math.random()*46));
07/08 13:29, 1F
文章代碼(AID): #1F-HE1JA (java)