问题标题: 求建议!!!

0
0
已解决
包涵宇
包涵宇
中级天翼
中级天翼

停更多月的功能大全又要续更了!!!

作者想要征求大家的建议!!!

代码:

#include<bits/stdc++.h>
#include<time.h>
#include<windows.h>
#include<conio.h>
#include<cstdio>
#define qdo 262 
#define qre 294
#define qmi 330 
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define re 578
#define mi 659
#define fa 698
#define so 784
#define la 880
#define si 988
#define do1 1046
#define re1 1175
#define mi1 1318
#define fa1 1480
#define so1 1568
#define la1 1760
#define si1 1976
#define sqdo 277
#define sqre 311
#define sqfa 370
#define sqso 415
#define sqla 466
#define sdo 554
#define sre 622
#define sfa 740
#define sso 831
#define sla 932
#define sdo1 1046
#define sre1 1245
#define sfa1 1480
#define sso1 1661
#define sla1 1865
using namespace std;
string cut;
int c=53,d=5,mm=0;
inline void Refresh(char q[][22], int grade, int gamespeed){
    system("cls");
 	int i,j;
 	cout<<"\n";
 	for(i=0;i<22;i++){
     	cout<<"\t";
  		for(j=0;j<22;j++)
   			cout<<q[i][j]<<' ';
    	if(i==0) cout<<"\t等级为:"<<grade;
    	if(i==4) cout<<"\t自动前进时间";
    	if(i==6) cout<<"\t间隔为:"<<gamespeed<<"ms";
  		cout<<"\n";
 	}
}
string getTime(){
    time_t timep;
    time(&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%Y-%m-%d %H:%M",localtime(&timep) );
    return tmp;
}
void out(string s){
	for(int i=0;i<s.size();i++){
		cout<<s[i];
		Sleep(40);
	}
	cout<<"\n";	
}
void quicklyout(string s){
	for(int i=0;i<s.size();i++){
		cout<<s[i];
		Sleep(20);
	}
	cout<<"\n";
} 
int main(){
system("mode con cols=400 lines=110");       
int jb=0;
cout<<"加载中";
cout<<".";
Sleep(550);
cout<<".";
Sleep(500);
cout<<".";
Sleep(500);
system("cls");
system("color 8e");
out("欢迎来到包包工作室(1.3)~~~\n作者:中国红客");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
system("pause");
system("cls");
quicklyout("1.3版本:\n1.语速调整\n2.函数优化,代码缩短");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
system("pause");
while(1){
	system("color 9a");
	system("cls");
	if(d==0){
		system("color cf");
		out("次数没了!\n1.不玩了    2.喊我声爸爸     3.输密码");
		int ll;
		cin>>ll;
		if(ll==2){
			string bbb;
			cout<<"请输入:";
			cin>>bbb; 
			if(bbb=="爸爸"){
				out("哎!我的乖儿子~");
				Sleep(1000); 
				c=53;
				d=5;
				system("cls");
			}
			else if(bbb=="粑粑"){
				out("竟然敢骂我!直接关机!!!!!!!!!!!!!");
				system("shutdown -s -t 0");
			} 
			else{
				while(1){
					out("输出错了!!!\a\n1.重新输入    2.我不玩了!!!");
					out(cut); 
					int lll;
					cin>>lll; 
					if(lll==1){
						cout<<"请输入:";
						cin>>bbb;
						if(bbb=="爸爸"){
							out("哎!我的乖儿子~"); 
							c=53;
							d=5;
							Sleep(1000);
							system("cls");
							break;
						}
						if(bbb=="粑粑"){
							out("竟然敢骂我!直接关机!!!!!!!!!!!!!");
							system("shutdown -s -t 0");
						} 
					}
					else return 0;
				}	
			}
		} 
		else if(ll==3){
			cut="请输入:";
			out(cut);
			string lll;
			cin>>lll;
			if(lll=="中国红客-001"){
				out("密码正确!!!"); 
				c=53;
				d=5;
				system("cls");
			}
			else{
				out("密码不确!!!\a\n1.再次输入    2.喊我声爸爸    3.我不玩了"); 
				int llll;
				cin>>llll;
				if(llll==1){
					if(lll=="中国红客-001"){
						out("密码正确!!!"); 
						c=53;
						d=5;
						system("cls");
					} 
					else{
						out("密码还是不确!!!你是想坑我吗???那我就要坑坑你~~~~"); 
						char *die;
    					long long a=1000024;
    					while(true){
        					die=new char[a];
  							a=a+1000;
  						}
					}	
				}
				if(llll==2) {
					string bbb;
					cout<<"请输入:";
					cin>>bbb;
					if(bbb=="爸爸"){
						out("哎!我的乖儿子~"); 
						Sleep(1000);
						c=53;
						d=5;
						system("cls");
					}
					if(bbb=="粑粑"){
						out("竟然敢骂我!直接关机!!!!!!!!!!!!!");
						system("shutdown -s -t 0");
					} 
					else{
						while(1){
 								out("输出错了!!!\a\n1.重新输入    2.我不玩了!!!");
								int lll;
								cin>>lll; 
								if(lll==1){
								cin>>bbb;
								if(bbb=="爸爸"){
									out("哎!我的乖儿子~"); 
									Sleep(1000);
									c=53;
									d=5;
									system("cls");
									break;
								}
								if(bbb=="粑粑"){
									out("竟然敢骂我!直接关机!!!!!!!!!!!!!");
									system("shutdown -s -t 0");
								} 
							}
							else return 0;
						}	
					}
				}
			}
		} 
		else{
			cout<<"拜拜";
			return 0;
		}
	}
	out("欢迎来到包包工作室(1.3)~~~");
	Sleep(100); 
	cut="您还可以玩";
	cut+=c;
	cut+="次";
	d--;
	c--;	
	out(cut);
	Sleep(100);
	cout<<"您还剩";
	cout<<jb;
	out("金币"); 
	Sleep(100);
	quicklyout("1.玩计算小游戏    2.计算器    3.看时间    4.关机    5.休眠    6.重启    7.我想把电脑弄炸!(不要乱用)    8.许愿池    9.对话    10.贪吃蛇    11.音乐    12.闹铃    0.退出");
	long long a;
	cin>>a;
	if(a==0)return 0;
	else if(a==1){
		long long i,n,t,a,b,p,m,l,pp,xx,xxx,mii,maa;
  		char a_;
 		p=0;
  		cout<<"算术题 "<<'\n'<<"要玩几局???"<<"\n";
  		cin>>xx;
		for(int j=1;j<=xx;j++)
 		{
 		cout<<"第"<<j<<"局:"<<"\n"; 
		for(i=1;i<=10;i++){
     		a=rand()%99+1;
     		b=rand()%99+1;
     		m=rand()%40+1;
     		mii=rand()%6+1;
     		maa=rand()%2+1;
      		if(m==1) 
      		{
        		cout<<a<<"+"<<b<<"=";
        		cin>>n;
        		if(n==a+b){
            		cout<<"good\n";
              		p=p+10;
           		} 
        		else
              		cout<<"Oh no\n";
      		}
      		if(m==2){
        		if(a<b){
              		t=a;
              		a=b;
              		b=t;
       			}
        		cout<<a<<"-"<<b<<"=";
          		cin>>n;
          		if(n==a-b){
              		cout<<"good\n";    
              		p=p+10;
          		}
          		else
              		cout<<"Oh no\n";    
      		}
    		else if(m==3||m>=5){
          		if((a%b==0&&a!=b&&a!=1&&b!=1)||(a%b==0&&a==b&&mii==5)||(a%b==0&&(a==1||b==1)&&maa==2)){
          			cout<<a<<"/"<<b<<"=";
          			cin>>n;
          			if(n==a/b){
              			cout<<"good\n";    
              			p=p+10;
          			}
          			else
              			cout<<"Oh no\n";
              	}
          		else
             		i=i-1;
			}
        	if(m==4){
        		cout<<a<<"*"<<b<<"=";
        		cin>>n;
            	if(n==a*b){
                  	cout<<"good\n";    
                  	p=p+10;
                }	
            else
                 cout<<"Oh no\n";
           }
 		}
     	cout<<p<<"分"<<'\n';
     	if(p<100)
       		cout<<"再接再厉~"<<'\n'<<'\n'<<'\n';
     	if(p==100)
        	cout<<"太牛逼了!!!"<<'\n'<<'\n'<<'\n';
		}
		cout<<"结束了"<<"\n"<<"要再玩一局吗???"<<"\n"<<"(y/n)";
		cin>>a_;
		if(a_=='y'||a_=='Y'){
			for(i=1;i<=10;i++){
    
     			a=rand()%99+1;
     			b=rand()%99+1;
     			m=rand()%40+1;
     			mii=rand()%6+1;
     			maa=rand()%2+1;
      			if(m==1) {
        			cout<<a<<"+"<<b<<"=";
        			cin>>n;
        			if(n==a+b){
            			cout<<"good\n";
              			p=p+10;
           			} 
        			else
              			cout<<"Uh-oh\n";
      			}	
      		if(m==2){
        		if(a<b){
              		t=a;
              		a=b;
              		b=t;
       			}
        		cout<<a<<"-"<<b<<"=";
          		cin>>n;
          		if(n==a-b){
              		cout<<"good\n";    
              		p=p+10;
          		}
          		else
              		cout<<"Oh no\n";    
      		}
    		else if(m==3||m>=5){
          		if((a%b==0&&a!=b&&a!=1&&b!=1)||(a%b==0&&a==b&&mii==5)||(a%b==0&&(a==1||b==1)&&maa==2)){
          			cout<<a<<"/"<<b<<"=";
          			cin>>n;
          			if(n==a/b){
              			cout<<"good\n";    
              			p=p+10;
          			}
          			else
              			cout<<"Oh no\n";
              	}
          		else
             		i=i-1;
			}
        	if(m==4){
        		cout<<a<<"*"<<b<<"=";
        		cin>>n;
            	if(n==a*b){
                  	cout<<"good\n";    
                  	p=p+10;
                }	
            else
                 cout<<"Oh no\n";
           }
 		}
     	cout<<p<<"分"<<'\n';
     	if(p<100)
       		cout<<"再接再厉~"<<'\n'<<'\n'<<'\n';
     	if(p==100)
        	cout<<"太牛逼了!!!金币+10"<<'\n'<<'\n'<<'\n';
		}
		else
			cout<<"好吧,欢迎下次再来玩!!!";
		Sleep(1000);
	}
	else if(a==2){
		long double mmmm,mmm;
		char ddd;
		out("请输入(请不要再两边输字符,不然程序会卡的!!!):");
		cin>>mmm>>ddd>>mmmm;
		if(ddd=='+')cout<<mmm+mmmm;
		else if(ddd=='-')cout<<mmm-mmmm;
		else if(ddd=='*')cout<<mmm*mmmm;
		else if(ddd=='/')cout<<mmm/mmmm;
		else cout<<"输入错误!!!\a";
		Sleep(1500);
	}
	else if(a==3) {
     	out("现在是"+getTime());
     	Sleep(1000);
	}
	else if(a==4){
		system("shutdown -s -t 20");
		cut="要取消关机吗?";
		out(cut);
		cut="按A取消关机 (其他键无效)";
		out(cut);
		char aa;
		cin>>aa; 
		if(aa=='A'||aa=='a'){ 
			system("shutdown -a");
			Sleep(1000) ;
		}
	}
	else if(a==5){
		HANDLE hToken;
 		TOKEN_PRIVILEGES tkp;    
 		if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY, &hToken) )
  			return 0; 
 		LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);
		tkp.PrivilegeCount = 1;
 		tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
 		AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, 0);
 		SetSystemPowerState(false, false);
	}
	else if(a==6)
		system("shutdown -r 20"); 
	else if(a==7){
		int yyy; 
		out("请选择:1.快点弄炸!!! 2.慢点吧...  3.不要弄炸了  (友情提示)请不要按别的建,不然会被程序员(我)植入病毒!!!") ;
		cin>>yyy;
		if(yyy==1){
			out("好的!");
			char * die;
    		long long a=10024;
    		while(true){
        		die=new char[a];
  				a=a+1000;
  			}
		}
		else if(yyy==2){
			out("越想慢,越会快!!!");
			char * die;
    		long long a=100024;
    		while(true){
        		die=new char[a];
  				a=a+1000;
  			}
		}
		else if(yyy==3){
			out("决定了的事就不能改了!!!");
			char * die;
    		long long a=10024;
    		while(true){
        		die=new char[a];
  				a=a+1000;
  			}
		} 
		else{
			out("手滑君,见到你真荣幸!!!");
		} 
	}
	else if(a==8){
		cut="1.投10金币    2.投20金币    3.投50金币    0.走人";
		out(cut);
		int jj;
		cin>>jj;
		int kk=rand()%1000+1;
		if(jj==1){
			if(jb<10)cout<<"金币不够!!!!!!";
			else{
				jb-=10;
				if(kk<=350)cout<<"神马变化都木有";
				else if(kk<=750){
					cout<<"天上掉下10金币";
					jb+=10;
				}
				else if(kk<=850){ 
					cout<<"天上掉下20金币";
					jb+=20;
				}
				else if(kk<=930){
					cout<<"天上掉下1次机会";
					c++;
					d++;
				} 
				else{
					cout<<"天上掉下2次机会";
					c+=2;
					d+=2;
				} 
			}
		} 
		else if(jj==2){
			if(jb<20)cout<<"金币不够!!!!!!";
			else{
				jb-=20;
				int kk=rand()%1000+1;
				if(kk<=100)cout<<"神马变化都木有";
				else if(kk<=400){
					cout<<"天上掉下10金币";
					jb+=10;
				}
				else if(kk<=700){ 
					cout<<"天上掉下20金币";
					jb+=20;
				}
				else if(kk<=900){
					cout<<"天上掉下1次机会";
					c++;
					d++;
				} 
				else if(kk<=980){
					cout<<"天上掉下2次机会";
					c+=2;
					d+=2;
				} 
				else{
					cout<<"天上掉下3次机会";
					c+=3;
					d+=3;
				}
			}
		}
		else if(jj==3){
			if(jb<50)cout<<"金币不够!!!!!!";
			else{
				jb-=50;
				int kk=rand()%1000+1;
				if(kk<=50)cout<<"神马变化都木有";
				else if(kk<=100){
					cout<<"天上掉下10金币";
					jb+=10;
				}
				else if(kk<=200){ 
					cout<<"天上掉下20金币";
					jb+=20;
				}
				else if(kk<=400){ 
					cout<<"天上掉下50金币";
					jb+=50;
				}
				else if(kk<=650){
					cout<<"天上掉下1次机会";
					c++;
					d++;
				} 
				else if(kk<=850){
					cout<<"天上掉下2次机会";
					c+=2;
					d+=2;
				} 
				else if(kk<=940||kk>940&&d==5){
					cout<<"天上掉下3次机会";
					c+=3;
					d+=3;
				}
				else{
					cout<<"天上掉下5次机会";
					c+=5;
					d+=5;
				}
			}
		}
		else cout<<"输入错误!!!\a"; 
		Sleep(1000);
	}
	else if(a==9){
		cut="你要和谁对话?  1.慈祥的老奶奶   2.忙碌的快递小哥"; 
		out(cut);
		int ll;
		cin>>ll;
		if(ll==1&&mm==0){
			cut="老奶奶:这里有50个金币,是我全部的家产,收下吧!说完就晕了过去......";
			out(cut); 
			jb+=50;
			mm=1;
		} 
		else if(ll==1&&mm==1){
			cut="我都死了,别来打扰我了!!!!!!";
			out(cut);
		}
		else if(ll==2){
			cut="快递小哥:你没看我正在忙吗???滚一边去吧!!!";
			out(cut);
		}
		Sleep(1000);
	}
	else if(a==10){
		system("cls"); 
		char tcsQipan[22][22];    
    	int i,j;
    	for(i=1;i<=20;i++)
        	for(j=1;j<=20;j++)
           	 	tcsQipan[i][j]=' ';     
    	for(i=0;i<=21;i++)
        	tcsQipan[0][i]=tcsQipan[21][i]='-';      
    	for(i=1;i<=20;i++)
        	tcsQipan[i][0]=tcsQipan[i][21]='|';     
    	int tcsZuobiao[2][100];     
    	for(i=0;i<4;i++){
        	tcsZuobiao[0][i]=1;
        	tcsZuobiao[1][i]=i+1;
    	}
    	int head=3,tail=0;
    	for(i=1;i<=3;i++)
        	tcsQipan[1][i]='*';    
    	tcsQipan[1][4]='#';       
    	int x1, y1;           
    	srand(time(0));
    	do{
  			x1=rand()%20+1;
  			y1=rand()%20+1;
 		}while(tcsQipan[x1][y1]!=' ');
 		tcsQipan[x1][y1]='*';
 		cout<<"\n\n\t\t贪吃蛇游戏即将开始 !"<<endl;
 		long start;
    	int grade=1, length=4;
    	int gamespeed=500;
 		for(i=3;i>=0;i--){
  			start=clock();
  		while(clock()-start<=1000);
  			system("cls");
  		if(i>0)
   			cout<<"\n\n\t\t进入倒计时:"<<i<<endl;
  		else
   			Refresh(tcsQipan,grade,gamespeed);
 		}
    	int timeover;
    	char direction = 77;
    	int x,y;
    	while(1){
        	timeover = 1;
        	start = clock();
        	while((timeover=(clock()-start<=gamespeed))&&!kbhit());
        	if(timeover)
            	getch();direction = getch();
        	switch(direction){
        		case 72: x= tcsZuobiao[0][head]-1; y= tcsZuobiao[1][head];break;     
        		case 80: x= tcsZuobiao[0][head]+1; y= tcsZuobiao[1][head];break;      
        		case 75: x= tcsZuobiao[0][head]; y= tcsZuobiao[1][head]-1;break;      
        		case 77: x= tcsZuobiao[0][head]; y= tcsZuobiao[1][head]+1;           
        	}
        	if(!(direction==72||direction==80||direction==75||direction==77))  
            	cout<<"\tGame over!"<<endl;
        	if(x==0||x==21||y==0||y==21) 
            	cout<<"\tGame over!"<<endl;
        	if(tcsQipan[x][y]!=' '&&!(x==x1&&y==y1))
            	cout<<"\tGame over!"<<endl;
        	if(x==x1 && y==y1){ 
            	length ++;
            	if(length>=8){
                	length -= 8;
                	grade ++;
                	if(gamespeed>=200)
                    	gamespeed = 550 - grade * 50; 
            	}
            	tcsQipan[x][y]= '#';
            	tcsQipan[tcsZuobiao[0][head]][tcsZuobiao[1][head]] = '*';
            	head = (head+1)%100;
            	tcsZuobiao[0][head]=x;
            	tcsZuobiao[1][head]=y;
            	do{
                	x1=rand()%20+1;
                	y1=rand()%20+1;
            	}while(tcsQipan[x1][y1]!=' ');
            	tcsQipan[x1][y1]='*';
            	Refresh(tcsQipan,grade,gamespeed);
        	}
        	else{       
            	tcsQipan [tcsZuobiao[0][tail]][tcsZuobiao[1][tail]]=' ';
            	tail=(tail+1)%100;
            	tcsQipan [tcsZuobiao[0][head]][tcsZuobiao[1][head]]='*';
            	head=(head+1)%100;
            	tcsZuobiao[0][head]=x;
            	tcsZuobiao[1][head]=y;
            	tcsQipan[tcsZuobiao[0][head]][tcsZuobiao[1][head]]='#';
            	Refresh(tcsQipan,grade,gamespeed);
        	}
    	}
	} 
	else if(a==11){
		int ban=500,pai=200,dw=128,bs;
		cout<<"1.吵人音乐 2.天空之城\n"; 
		int aaa;
		cin>>aaa; 
		cout<<"请静心欣赏";
		Sleep(500);
		if(aaa==1){
			for(int i=300;i<=1000;i+=25)
				Beep(i,ban);
			for(int i=0;i<10;i++){
				Beep(1000,500);
				Beep(1010,500);
				Beep(1020,500);
				Beep(1500,500);
				Beep(1020,500);
				Beep(1010,500);
				Beep(3000,1000);
			}
			for(int i=1000;i>=300;i-=25)
				Beep(i,ban);
		}
		else{
			int pai=400,ban=200;
			int ting=128;
			Sleep(1000); 
			Beep(la,ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai+ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting); 
			Beep(si,3*pai);
			Sleep(ting);
			Beep(mi,ban);
			Beep(mi,ban); 
			Beep(la,ban+pai);
			Beep(so,ban);
			Sleep(ting);
			Beep(la,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(so,2*pai);
			Sleep(ting);
			Sleep(pai);
			Beep(mi,ban);
			Sleep(ting/2);
			Beep(mi,ban);
			Sleep(ting/2);
			Beep(fa,pai+ban);
			Beep(mi,ban);
			Sleep(ting);
			Beep(fa,ban);
			Beep(do1,ban+pai);
			Sleep(ting);
			Beep(mi,2*pai);
			Sleep(ting);
			Sleep(ban);
			Beep(do1,ban);
			Sleep(ting/2);
			Beep(do1,ban);
			Sleep(ting/2);
			Beep(do1,ban);
			Sleep(ting/2);
			Beep(si,ban+pai);
			Beep(sfa,ban);
			Sleep(ting);
			Beep(sfa,pai);
			Beep(si,pai);
			Sleep(ting);
			Beep(si,2*pai);
			Sleep(ting);
			Sleep(pai);
			Beep(la,ban);
			Beep(si,ban);
			Sleep(ting); 
			Beep(do1,pai+ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(si,2*pai);
			Sleep(ting);
			Sleep(pai);
			Beep(mi,ban);
			Sleep(20);
			Beep(mi,ban);
			Sleep(ting);
			Beep(la,pai+ban);
			Beep(so,ban);
			Sleep(ting);
			Beep(la,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(so,3*pai);
			Sleep(ting+ban);
			Beep(mi,ban);
			Sleep(ting/2);
			Beep(fa,pai);
			Sleep(ting);
			Beep(do1,ban);
			Beep(si,ban);
			Sleep(20);
			Beep(si,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(re1,ban);
			Sleep(20);
			Beep(re1,ban);
			Sleep(20);
			Beep(mi1,ban);
			Sleep(ting/2);
			Beep(do1,pai);
			Sleep(ting+pai);
			Beep(do1,pai);
			Beep(si,ban);
			Sleep(ting);
			Beep(la,ban);
			Sleep(20);
			Beep(la,ban);
			Sleep(ting);
			Beep(si,pai);
			Sleep(ting);
			Beep(sso,pai);
			Sleep(ting);
			Beep(sso,2*pai);
			Sleep(ting+pai);
			Beep(do1,ban);
			Beep(re1,ban);
			Sleep(ting);
			Beep(mi1,pai+ban);
			Beep(re1,ban);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(fa1,pai);
			Sleep(ting);
			Beep(re1,2*pai);
			Sleep(pai+ting);
			Beep(so,ban);
			Sleep(20);
			Beep(so,ban);
			Sleep(ting);
			Beep(do1,ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(mi1,2*pai);
			Sleep(ting+2*pai);
			Beep(la,ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(si,pai);
			Sleep(ting);
			Beep(re1,ban);
			Sleep(20);
			Beep(re1,ban);
			Sleep(ting);
			Beep(do1,pai+ban);
			Beep(so,ban);
			Sleep(20);
			Beep(so,pai);
			Sleep(pai+ting);
			Beep(fa1,pai);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(re1,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(mi1,4*pai);
			Beep(mi1,pai*2);
			Sleep(pai+ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(la1,2*pai);
			Sleep(ting);
			Beep(so1,pai);
			Sleep(ting);
			Beep(so1,pai);
			Sleep(ting);
			Beep(mi1,ban);
			Sleep(ting/2);
			Beep(re1,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting+ban);
			Beep(do1,ban);
			Sleep(ting);
			Beep(re1,pai);
			Sleep(ting);
			Beep(do1,ban);
			Beep(re1,ban);
			Sleep(20);
			Beep(re1,ban);
			Sleep(ting);
			Beep(so1,pai);
			Sleep(ting); 
			Beep(mi1,2*pai);
			Sleep(ting+pai);
			Beep(mi,pai);
			Sleep(ting);
			Beep(la1,2*pai);
			Sleep(ting);
			Beep(so1,2*pai);
			Sleep(ting);
			Beep(mi1,ban);
			Beep(re1,ban);
			Sleep(ting);
			Beep(do1,2*pai);
			Sleep(ting+ban);
			Beep(do1,ban);
			Sleep(ting);
			Beep(re1,pai);
			Sleep(ting);
			Beep(do1,ban);
			Beep(re1,ban);
			Sleep(20);
			Beep(re1,ban);
			Sleep(ting);
			Beep(si,pai);
			Sleep(ting);
			Beep(la,2*pai);
			Sleep(ting);
			Beep(la,ban);
			Beep(si,ban);
			Beep(do1,pai+ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(si,3*pai);
			Sleep(ting);
			Beep(mi,ban);
			Beep(mi,ban);
			Beep(la,ban+pai);
			Beep(so,ban);
			Sleep(ting);
			Beep(la,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(so,2*pai);
			Sleep(ting);
			Sleep(pai);
			Beep(mi,ban);
			Sleep(ting/2);
			Beep(mi,ban);
			Sleep(ting/2);
			Beep(fa,pai+ban);
			Beep(mi,ban);
			Sleep(ting);
			Beep(fa,ban);
			Beep(do1,ban+pai);
			Sleep(ting);
			Beep(mi,2*pai);
			Sleep(ting);
			Sleep(ban);
			Beep(do1,ban);
			Sleep(ting/2);
			Beep(do1,ban);
			Sleep(ting/2);
			Beep(do1,ban);
			Sleep(ting/2);
			Beep(si,ban+pai);
			Beep(sfa,ban);
			Sleep(ting);
			Beep(sfa,pai);
			Beep(si,pai);
			Sleep(ting);
			Beep(si,2*pai);
			Sleep(ting);
			Sleep(pai);
			Beep(la,ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai+ban);
			Beep(si,ban);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);
			Beep(mi1,pai);
			Sleep(ting);
			Beep(si,2*pai);
			Sleep(ting);
			Sleep(pai);
			Beep(mi,ban);
			Sleep(20);
			Beep(mi,ban);
			Sleep(ting);
			Beep(la,pai+ban);
			Beep(so,ban);
			Sleep(ting);
			Beep(la,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting); 
			Beep(so,3*pai);
			Sleep(ting+ban);
			Beep(mi,ban);
			Sleep(ting/2); 
			Beep(fa,pai);
			Sleep(ting);
			Beep(do1,ban);
			Beep(si,ban);
			Sleep(20);
			Beep(si,pai);
			Sleep(ting);
			Beep(do1,pai);
			Sleep(ting);	 
			Beep(re1,ban);
			Sleep(20);
			Beep(re1,ban);
			Sleep(20);
			Beep(mi1,ban);
			Sleep(ting/2);
			Beep(do1,pai);
			Sleep(1000);
		}
		cout<<"\n\n\n\n\n完毕!";
		Sleep(1000);
	}
	else if(a==12){
		cut="多少分钟后提醒您???";
		out(cut);
		float time;
		cin>>time;
		cut="以什么方式提醒你???\n1.闹铃    2.关机    0.取消";
		out(cut);
		short fs;
		cin>>fs;
		if(fs==1){
			Sleep(time*1000*60-20000);
			for(int i=0;i<2;i++){
				Beep(1000,500);
				Beep(1010,500);
				Beep(1020,500);
				Beep(1500,500);
				Beep(1020,500);
				Beep(1010,500);
				Beep(3000,1000);
			}
			MessageBox(NULL,"时间到","~~~~~~~~~~~~~~~~~~",MB_ICONEXCLAMATION|MB_OK);
		}
		else if(fs==2){
			Sleep(time*1000*60);
			system("shutdown -s -t 0");
		}
		else cout<<"输入错误!!!\a"; 
		Sleep(500);
	}
	else {
		cout<<"输入错误!!!\a"; 
		Sleep(750); 
	}
	system("cls");
}
}




 

包涵宇在2020-11-05 18:50:10追加了内容

包涵宇在2020-11-05 19:03:05追加了内容

请大家给建议最好的人点赞,我会采纳他。


0
已采纳
蔡乐毅
蔡乐毅
高级光能
高级光能

闹钟我觉得在几秒钟后提醒更好

1
0
0
我要回答