Answer to Question #199451 in C++ for Anupama Kota

Question #199451

How tick tick sound can be generated through CPP program?


1
Expert's answer
2021-05-27T19:09:14-0400
#include <windows.h> // WinApi header 
using namespace std;


main(void)
{
	int n=0,m;
	int Freq,ON_Time;


	Freq=1000;	//Hz
	ON_Time = 100; //msec.
	for(n=0;n<10;n++)
	{
		Beep(Freq, ON_Time); 
		Beep(0, ON_Time); 
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog