各位大神帮我看看这个代码哪错了,谢谢
#include<windows.h>#include<stdio.h>
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,0x3E8,
0x177,0x07D,0x1F4,0x1F4,0x3E8,
0x177,0x07D,0x1F4,0x1F4,0x1F4,0x1F4,0x3E8,
0x177,0x07D,0x1F4,0x1F4,0x1F4,0x3E8,
};
void play_music();//奏乐
int main(int argc,char*argv[])
{
puts ("happy birthday!\n");
play_music();
return 0;
}
void play_music()
{
int i=0;
for(;i<25;++i)
{
Beep(rhythm[i]*5,delay[i]);
if(i==24)
{
Sleep(500);
i=0
;}
}
}