初级守护
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<"<--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <--2-->"<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(500);
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
return 0;
}
输出版本
李维桢在2021-10-06 20:42:27追加了内容
带到c++里就不会像现在看到的这样歪
李维桢在2021-10-07 12:23:23追加了内容
#include<iostream>
#include<windows.h>
using namespace std;
int main(){
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | <0> "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" <-1-> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"<--2--> | <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> <0> "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<"<--2--> <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<"<--2--> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<"<--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2--> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <--2-->"<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> <--2-->"<<endl;
cout<<" | <-1-> | "<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | <0> | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> <-1-> <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | <-1-> | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" <0> | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" <0> | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
Sleep(10);
system("cls");
cout<<" "<<endl;
cout<<" | | | "<<endl;
cout<<" | | <0> "<<endl;
cout<<" | | <-1-> "<<endl;
cout<<" | | <--2-->"<<endl;
cout<<"-------------------------"<<endl;
return 0;
}
修改版
新手光能
三根柱子分别称为a,b,c,计算n阶汉洛塔过程程序如下
#include<bits/stdc++.h>
using namespace std;
void move(char a,char b,char c,int n){
if(n>=1){
move(a,c,b,n-1);
cout<<a<<"->"<<c<<endl;
move(b,a,c,n-1);
}
}
int main(){
int n;
cin>>n;
move('a','b','c',n);
}
中级守护
建议加一下清屏函数
system("cls")
徐知乐在2021-10-06 21:47:22追加了内容
再加一个隐藏光标的函数会更好些
void HideCursor(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
汉诺塔上的珠子左右移动时最好一个字符一个字符地移动
这样看着会更细腻些