#include #include /* this founcti" />

麻花豆传媒剧国,亚洲国产精品无码,欧州黄片视频免费观看,外国性生活一区二区

c語言中,beep是個什么函數?

提問者: 妖女38 2015-09-19 00:00

最佳答案

是發聲函數,運行后通過主板喇叭唱出旋律,可以試試下面: TC 試: #include #include #include /* this founction plays sound until hit any key */ void mysound() { long freq ; while(!kbhit()){/* while no keyboard hit, play sound */ for(freq=200L;freq<2000L;freq+=200L){ sound(freq);/*play freq sound*/ delay(200);/*delay 200ms*/ } } nosound();/* stop playing */ } 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 試驗上兩個。

回答者:dy6263237812016-09-19 00:00

相關問題

按字母分類: