//
//Created by Carlgood.
//
//Note:This program is written in version DEV-C++ 5.11.
# include<iostream>
# include<cmath>
# include<string>
# include<cstring>
# include<cstdio>
# include<algorithm>
# include<sstream>
# include<iomanip>
# include<vector>
# include<queue>
# include<deque>
# include<stack>
# include<stdio.h>
# include<conio.h>
# include<windows.h>
# include<ctime>
# define This_program_is_written_by_Carlgood_Programming_Studio 9876543210
using namespace std;
long long f=1;
void F(int n)
{
system("cls");
if(n>f)
{
for(int i=f;i<=n;i++)
{
if(i==0) continue;
cout<<"|↑|"<<i<<"F|\n";
cout<<"__________\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"----------\n";
Sleep(1111);
system("cls");
f++;
}
}
else if(n<f)
{
for(int i=f;i>=n;i--)
{
if(i==0) continue;
cout<<"|↓|"<<i<<"F|\n";
cout<<"__________\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"----------\n";
Sleep(1111);
system("cls");
}
}
f=n;
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"----------\n";
Sleep(987);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| |\n";
cout<<"| |\n";
cout<<"| |\n";
cout<<"| |\n";
cout<<"| |\n";
cout<<"| |\n";
cout<<"----------\n";
Sleep(5432);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"|| ||\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"| | | |\n";
cout<<"----------\n";
Sleep(345);
system("cls");
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"----------\n";
return ;
}
int main()
{
system("cls");
system("title Elevator Monitoring System--C.G.P.S");
srand(time(0));
while(1)
{
system("cls");
long long n=rand()%32;
cout<<"| |"<<f<<"F|\n";
cout<<"__________\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"| | |\n";
cout<<"----------\n";
int zf=rand()%3;
if(zf==1)
{
n=rand()%10;
n-=n*2;
}
system("cls");
if(n!=0) F(n);
Sleep(4567);
}
return 0;
}
C++电梯模拟动画(效果不好自己修改)
最新推荐文章于 2024-06-09 20:18:37 发布