logo
  • 教程列表
  • SO官方文檔
  • 生成一個隨機數
    • 6 雙面模具
    • 從範圍(包括)生成隨機數
  1. StackOverflow 文件
  2. Ruby Language 教程
  3. 生成一個隨機數
  4. 6 雙面模具

6 雙面模具

Created: November-22, 2018

   # Roll a 6 sided die, rand(6) returns a number from 0 to 5 inclusive
   dice_roll_result = 1 + rand(6)
  • 從範圍(包括)生成隨機數
  • 生成一個隨機數

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明