C语言发声函数
答案:1 悬赏:0 手机版
解决时间 2021-03-31 14:38
- 提问者网友:龅牙恐龙妹
- 2021-03-31 11:37
C语言发声函数
最佳答案
- 五星知识达人网友:轻雾山林
- 2021-03-31 12:49
TC 试:
#include
#include
#include
void mysound()
{
long freq ;
while(!kbhit()){
for(freq=200L;freq<2000L;freq+=200L){
sound(freq);
delay(200);
}
}
nosound();
}
void main()
{
mysound() ;
}
---------------
VC++ 试:
#include
#include
#include
main()
{
Beep(523,500);
Beep(587,500);
Beep(659,500);
Beep(698,500);
Beep(784,500);
Sleep(500);
Beep(523,500);
Beep(587,500);
Beep(659,500);
Beep(698,500);
Beep(784,500);
}
------
wintc 试验上两个。
#include
#include
#include
void mysound()
{
long freq ;
while(!kbhit()){
for(freq=200L;freq<2000L;freq+=200L){
sound(freq);
delay(200);
}
}
nosound();
}
void main()
{
mysound() ;
}
---------------
VC++ 试:
#include
#include
#include
main()
{
Beep(523,500);
Beep(587,500);
Beep(659,500);
Beep(698,500);
Beep(784,500);
Sleep(500);
Beep(523,500);
Beep(587,500);
Beep(659,500);
Beep(698,500);
Beep(784,500);
}
------
wintc 试验上两个。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯