作業需要我用rand,srand和time獲得骰子. ... to simulate a random dice roll int rollDice() { int r; srand (time(NULL)); r = (rand() % 6) + 1; return r; }.
確定! 回上一頁