#include<windows.h>
#include<stdio.h>
DWORD WINAPI play_music(PVOID pParam);
DWORD WINAPI pray(PVOID pParam);
unsigned int rhythm[] = {
0x188, 0x188, 0x1B8, 0x188, 0x20B, 0x1EE,
0x188, 0x188, 0x1B8, 0x188, 0x24B, 0x20B,
0x188, 0x188, 0x310, 0x293, 0x20B, 0x1EE,
0x1B8, 0x2BA, 0x2BA, 0x293, 0x20B, 0x24B,
0x20B
};
unsigned int delay[] = {
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
};
void main() 垣
{
HANDLE threadTest[2];
int i=1,j=2;
threadTest[0]=CreateThread(NULL,0,play_music,NULL,0,0);
芈姝怎么死的 threadTest[1]=CreateThread(NULL,0,pray,NULL,0,0);
WaitForMultipleObjects(2,threadTest,true,INFINITE);
}
DWORD WINAPI play_music(PVOID pParam)
{
int i = 0;
for(; i < 25; ++i)
{
Beep(rhythm[i]*5, delay[i]);
if(i == 24)
{
Sleep(500);
i = 0;
}
}
return 0;
}
DWORD WINAPI pray(PVOID pParam)
{
int i=0;
system("color 5e");
刘竟图片 printf("\n\n\n");
printf(" ☆☆★☆☆☆★☆☆☆★☆\n");
printf(" ☆ ☆\n");
printf(" ☆ 生日快乐 ★\n");
printf(" ☆ ☆\n");
printf(" ☆★☆☆☆★☆☆☆★☆☆\n");
printf("\n\n");
for(i=0;i<56;i++)
{
printf("%c",c[i]);
Sleep(100);
}
printf("\n\n");
Sleep(100);
for(i=56;i<135;i++)
{
printf("%c",c[i]);
Sleep(100);
}
printf("\n\n");天盛长歌七皇子
system("pause");
return 0;
}
发布评论