中级光能
好吧我告诉你,不装大佬了。
主要函数
Beep(声调,频率(一拍是400秒))
Sleep(秒数)
#include<windows.h>
其实做音乐很难的,有时你控制不好音调的。(我最近在做爱国曲)
望采纳!!!!
中级守护
请看小星星:
#include<windows.h>
#include<cstdio>
#include<iostream>
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#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;
int main()
{
int ban=500,pai=200,dw=128,bs;
cout<<"请静心欣赏";
Sleep(1000);
cout<<"\n\n追光者";
Beep(do,ban);
Beep(do,ban);
Beep(so,800);
Beep(so,ban);
Beep(la,ban);
Beep(la,ban);
Beep(so,ban);
Beep(fa,ban/2+100);
Beep(fa,ban/2+100);
Beep(mi,ban);
Beep(mi,ban);
Beep(re,ban);
Beep(re,ban);
Beep(do,ban);
return 0;
}
中级守护
#include<windows.h>
#include<cstdio>
#include<iostream>
#define qdo 262
#define qre 294
#define qmi 330
#define qfa 349
#define qso 392
#define qla 440
#define qsi 494
#define do 523
#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;
int main()
{
int ban=500,pai=200,dw=128,bs;
cout<<"请静心欣赏";
Sleep(1000);
cout<<"\n\n小星星";
Beep(do,ban);
Beep(do,ban);
Beep(so,800);
Beep(so,ban);
Beep(la,ban);
Beep(la,ban);
Beep(so,ban);
Beep(fa,ban/2+100);
Beep(fa,ban/2+100);
Beep(mi,ban);
Beep(mi,ban);
Beep(re,ban);
Beep(re,ban);
Beep(do,ban);
return 0;
}