中级守护
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <windows.h>
using namespace std;
// _在前表示低音, 在后表示高音
// o表示升
const int _oC=277,_oD=311,_oF=370,_oG=415,_oA=466;
const int _C=262,_D=294,_E=330,_F=349,_G=392,_A=440,_B=494;
const int oC=554,oD=622,oF=740,oG=831,oA=932;
const int C=523,D=578,E=659,F=698,G=784,A=880,B=988;
const int C_=1047,D_ =1175,E_=1319,F_=1397,G_=1568,A_=1760,B_=1976;
const int oC_=1109,oD_=1245,oF_=1480,oG_=1661,oA_=1865;
const int T=300; //一拍的长度
const int Stop=150; //一拍休止符的长度
int main(){
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" 请收听:黑人抬棺!";
Sleep(1000);
system("cls");
system("color F0");
cout<<endl;
cout<<" ████████████"<<endl;
cout<<" ■■■■■■■■■■■■"<<endl;
cout<<" ● ▎ ┃ ●┃ ┃ ●"<<endl;
cout<<" ━━ ▎━ ━ ▎━ ━ ▎ ━━"<<endl;
cout<<" ▎ ▎ ▎ "<<endl;
cout<<" ▎┃ ▎┃ ▎┃"<<endl<<endl<<endl;
cout<<" \\ ▍/"<<endl;
cout<<" ▅▅▅▅"<<endl;
cout<<" / ▎\\"<<endl;
cout<<" ▅▅▅▅"<<endl;
cout<<" ▅▍▍▅"<<endl;
cout<<" / \\"<<endl;
while(1){
Beep(D,T*2);
Beep(D,T);
Beep(A,T);
Sleep(10);
system("color 10");
Beep(G,T*2);
Beep(F,T*2);
Sleep(30);
system("color 20");
Beep(E,T*2);
Beep(E,T);
Beep(E,T);
Beep(G,T*2);
Sleep(Stop);
system("color 30");
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Sleep(50);
system("color 40");
Beep(D,T);
Beep(F,T);
Sleep(7);
Beep(E,T);
Sleep(30);
system("color 50");
Beep(F,T);
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Sleep(50);
system("color 60");
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Sleep(7);
system("color 70");
Beep(E,T);
Beep(F,T);
Sleep(10);
system("color 80");
Beep(F,T);
Beep(F,T);
Beep(F,T);
Beep(F,T);
Sleep(5);
system("color 90");
Beep(A,T);
Beep(A,T);
Beep(A,T);
Beep(A,T);
Sleep(5);
system("color A0");
Beep(G,T);
Beep(G,T);
Beep(G,T);
Beep(G,T);
Sleep(5);
system("color B0");
Beep(C_,T);
Beep(C_,T);
Sleep(5);
Beep(C_,T);
Beep(C_,T);
Sleep(5);
system("color C0");
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Sleep(5);
system("color D0");
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Sleep(5);
system("color E0");
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Sleep(5);
system("color 70");
Beep(F,T);
Beep(E,T);
Beep(D,T);
Beep(C,T);
Sleep(5);
system("color A0");
}
return 0;
}
/*
cout<<" ████████████";
cout<<" ■■■■■■■■■■■■";
cout<<" ● ▎ ┃●┃ ┃● ";
cout<<" ━━▎━ ━▎━ ━▎━━ ";
cout<<" ▎ ▎ ▎ ";
cout<<" ▎┃ ▎┃ ▎┃";
cout<<" ████████████";
cout<<" ■■■■■■■■■■■■";
cout<<" ● ▎ ┃●┃ ┃●";
cout<<" ━━▎━ ━▎━ ━▎━━";
cout<<" ▎ ▎ ▎ ";
cout<<" ▎┃ ▎┃ ▎┃";
*/
更多代码尽在“晨光游戏工作室”;(出自凌健辉);
更多代码和文学尽在“历史文学社”;(出自本人)。
中级守护
杨士元
新手守护
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <windows.h>
using namespace std;
// _在前表示低音, 在后表示高音
// o表示升
const int _oC=277,_oD=311,_oF=370,_oG=415,_oA=466;
const int _C=262,_D=294,_E=330,_F=349,_G=392,_A=440,_B=494;
const int oC=554,oD=622,oF=740,oG=831,oA=932;
const int C=523,D=578,E=659,F=698,G=784,A=880,B=988;
const int C_=1047,D_ =1175,E_=1319,F_=1397,G_=1568,A_=1760,B_=1976;
const int oC_=1109,oD_=1245,oF_=1480,oG_=1661,oA_=1865;
const int T=300; //一拍的长度
const int Stop=150; //一拍休止符的长度
int main(){
cout<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<" 请收听:黑人抬棺!";
Sleep(1000);
system("cls");
system("color F0");
cout<<endl;
cout<<" ████████████"<<endl;
cout<<" ■■■■■■■■■■■■"<<endl;
cout<<" ● ▎ ┃ ●┃ ┃ ●"<<endl;
cout<<" ━━ ▎━ ━ ▎━ ━ ▎ ━━"<<endl;
cout<<" ▎ ▎ ▎ "<<endl;
cout<<" ▎┃ ▎┃ ▎┃"<<endl<<endl<<endl;
cout<<" \\ ▍/"<<endl;
cout<<" ▅▅▅▅"<<endl;
cout<<" / ▎\\"<<endl;
cout<<" ▅▅▅▅"<<endl;
cout<<" ▅▍▍▅"<<endl;
cout<<" / \\"<<endl;
while(1){
Beep(D,T*2);
Beep(D,T);
Beep(A,T);
Sleep(10);
system("color 10");
Beep(G,T*2);
Beep(F,T*2);
Sleep(30);
system("color 20");
Beep(E,T*2);
Beep(E,T);
Beep(E,T);
Beep(G,T*2);
Sleep(Stop);
system("color 30");
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Sleep(50);
system("color 40");
Beep(D,T);
Beep(F,T);
Sleep(7);
Beep(E,T);
Sleep(30);
system("color 50");
Beep(F,T);
Beep(F,T);
Beep(E,T);
Beep(D,T*2);
Sleep(50);
system("color 60");
Beep(D,T);
Beep(F,T);
Beep(E,T);
Beep(F,T);
Sleep(7);
system("color 70");
Beep(E,T);
Beep(F,T);
Sleep(10);
system("color 80");
Beep(F,T);
Beep(F,T);
Beep(F,T);
Beep(F,T);
Sleep(5);
system("color 90");
Beep(A,T);
Beep(A,T);
Beep(A,T);
Beep(A,T);
Sleep(5);
system("color A0");
Beep(G,T);
Beep(G,T);
Beep(G,T);
Beep(G,T);
Sleep(5);
system("color B0");
Beep(C_,T);
Beep(C_,T);
Sleep(5);
Beep(C_,T);
Beep(C_,T);
Sleep(5);
system("color C0");
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Sleep(5);
system("color D0");
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Sleep(5);
system("color E0");
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Beep(D_,T);
Sleep(5);
system("color 70");
Beep(F,T);
Beep(E,T);
Beep(D,T);
Beep(C,T);
Sleep(5);
system("color A0");
}
return 0;
}
/*
cout<<" ████████████";
cout<<" ■■■■■■■■■■■■";
cout<<" ● ▎ ┃●┃ ┃● ";
cout<<" ━━▎━ ━▎━ ━▎━━ ";
cout<<" ▎ ▎ ▎ ";
cout<<" ▎┃ ▎┃ ▎┃";
cout<<" ████████████";
cout<<" ■■■■■■■■■■■■";
cout<<" ● ▎ ┃●┃ ┃●";
cout<<" ━━▎━ ━▎━ ━▎━━";
cout<<" ▎ ▎ ▎ ";
cout<<" ▎┃ ▎┃ ▎┃";
*/