⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 hanoi 是一个用递归算法计算“汉诺塔”的经典递归程序
💻 CPP
字号:
# include <iostream.h>
# include <conio.h>
# include "head.h"

//--------------------------------------------------------


void main()
{
  int num;
  char face=1;
  cout<<"Input the number of tower:";
  cin>>num;
  if (num>=1 && num<=45)
    move (num,1,2,3);
  else if (num>15 && num<=20)
         {
           cout<<"Please wait a moment..."<<endl;
           move (num,1,2,3);
         }
       else cout<<"Are you crazy ? "<<face<<endl<<endl;
  cout << "Press any key to exit ...";
  getch();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -