2016年3月28日

掷筛子游戏

摘要: #include #include using namespace std; int roolDice() { int die1 = 1 + rand() %6; int die2 = 1 + rand() %6; int sum = die1 + die2; cout > seed; srand(seed); sum = roolDice();... 阅读全文

posted @ 2016-03-28 18:29 Tob's_the_top 阅读(123) 评论(0) 推荐(0) 编辑

汉诺塔问题

摘要: #include using namespace std; /*将src针上最上面一个盘子移到dest针上*/ void move(char src,char dest) { cout " > n; cout << "步骤分别是"<<endl; hanoi(n,'A','B','C'); return 0; } 阅读全文

posted @ 2016-03-28 18:01 Tob's_the_top 阅读(149) 评论(0) 推荐(1) 编辑

导航