欢乐颂

#include <cstdio>
#include<iostream>
#include <windows.h>
using namespace std;

#define    qdo 262 
#define qre 294
#define qmi 330        //q前缀为低音,1后缀为高音,s前缀为半音阶 
#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
int t=0;
int main()
{
    int bk=500;
    Sleep(1000);
    while (1==1)
    {
        cout<<"*"<<++t<<endl;
        Beep(mi,bk);
        Beep(mi,bk);
        Beep(fa,bk);
        Beep(so,bk);Beep(so,bk);
        Beep(fa,bk);Beep(mi,bk);
        Beep(re,bk);Beep(do,bk);
        Beep(do,bk);Beep(re,bk);
        Beep(mi,bk);Beep(mi,bk+250);
        Beep(re,bk-250);Beep(re,bk*2);
        
        Beep(mi,bk);
        Beep(mi,bk);
        Beep(fa,bk);
        Beep(so,bk);Beep(so,bk);
        Beep(fa,bk);Beep(mi,bk);
        Beep(re,bk);Beep(do,bk);
        Beep(do,bk);Beep(re,bk);
        Beep(mi,bk);Beep(re,bk+250);
        Beep(do,bk-250);Beep(do,bk*2);
        
        Beep(re,bk);
        Beep(re,bk);
        Beep(mi,bk);
        Beep(do,bk);
        Beep(re,bk);
        Beep(mi,bk-250);Beep(fa,bk-250);
        Beep(mi,bk);
        Beep(do,bk);
        Beep(re,bk);
        Beep(mi,bk-250); Beep(fa,bk-250);
        Beep(mi,bk);
        Beep(re,bk);
        Beep(do,bk);
        Beep(re,bk);
        Beep(qso,bk*2);
        
        Beep(mi,bk);
        Beep(mi,bk);
        Beep(fa,bk);
        Beep(so,bk);Beep(so,bk);
        Beep(fa,bk);Beep(mi,bk);
        Beep(re,bk);Beep(do,bk);
        Beep(do,bk);Beep(re,bk);
        Beep(mi,bk);Beep(re,bk+250);
        Beep(do,bk-250);Beep(do,bk*2);
    }
    return 0;
}

 

posted @ 2017-03-07 20:34  Aptal丶  阅读(217)  评论(0编辑  收藏  举报