数字放大器:
#include<iostream>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<cstring>
#include<string>
#include<cstdio>
#include<algorithm>
#include<windows.h>
#define int long long//define int long long,你值得拥有!
#define I register int//#define I register int,你值得拥有!
#define maxn 1000000
#define maxm 1000
using namespace std;
int gcd(int a,int b)
{
if(a%b==0) return b;
else return gcd(b,a%b);
}
string a[]={" ■■■ ","■ "," ■■■ ","■■■■ ","■ ■ ","■■■■■ "," ■■■ ","■■■■■ "," ■■■ "," ■■■ "};
string b[]={"■ ■ ","■ "," ■ "," ■ ","■ ■ ","■ ","■ "," ■ ","■ ■ ","■ ■ "};
string c[]={"■ ■ ","■ "," ■■■ "," ■■■ ","■■■■■ ","■■■■■ "," ■■■ "," ■ "," ■■■ "," ■■■■ "};
string d[]={"■ ■ ","■ ","■ "," ■ "," ■ "," ■ ","■ ■ "," ■ ","■ ■ "," ■ "};
string e[]={" ■■■ ","■ "," ■■■ ","■■■■ "," ■ ","■■■■■ "," ■■■ "," ■ "," ■■■ "," ■ "};
int lcm(int a,int b){return a*b/gcd(a,b);}
signed main()
{
for(int i=1;i<=50;i++)
{
printf("loading......\n");
for(int i=1;i<=50;i++) printf("_");
cout<<endl;
for(int k=1;k<=5;k++)
{
for(int j=1;j<=i;j++)
{
printf("■");
}
printf("\n");
}
for(int i=1;i<=50;i++) printf("_");
Sleep(100);
system("cls");
}
cout<<"OK!";
Sleep(500);
system("cls");
while(1)
{
cout<<"The num which need to bigger:";
string s;cin>>s;
vector<int> wei;
for(int i:s) wei.push_back(i-'0');
int size=wei.size(),zhang=0;
while(size)
{
for(int i=0;i<min(size,21ll);i++) cout<<a[wei[zhang+i]];
cout<<endl;
for(int i=0;i<min(size,21ll);i++) cout<<b[wei[zhang+i]];
cout<<endl;
for(int i=0;i<min(size,21ll);i++) cout<<c[wei[zhang+i]];
cout<<endl;
for(int i=0;i<min(size,21ll);i++) cout<<d[wei[zhang+i]];
cout<<endl;
for(int i=0;i<min(size,21ll);i++) cout<<e[wei[zhang+i]];
cout<<"\n\n";
size-=20;
zhang+=21;
if(size<=0) break;
}
cout<<"--------------------------------\nProcess exited after [unkown_num] seconds with return value 0\n请按任意键继续. . .(真的,不是退出!)";
getchar();getchar();
system("cls");
}
}