Beep() in c

HEY, this program may help you in generating a beep sound in your dos or Windows system. and how it’s work full explanation for Beep() in C++

How to make a Beep sound in C on Windows

#include <iostream>
#include<stdlib.h>
#include<time.h>
#include<conio.h>
#include<windows.h>

using namespace std;

int main()
{
int tecla, m;
m=1;
srand(time(0));

       while(m)

{

tecla=rand()%10;
switch(tecla){
case 1: Beep(261.626,250); break;
case 2: Beep(293.666,250); break;
case 3: Beep(329.698,250); break;
case 4: Beep(349.228,250); break;
case 5: Beep(391.995,250); break;
case 6: Beep(440.000,250); break;
case 7: Beep(493.883,250); break;
case 8: Beep(523.251,250); break;
case 9: Beep(587.330,250); break;
case 0: m=0; break;
}
}

   // cout<<beep;

    return 0;
}

Producing Beep Sound with C++

END

Beep() in c
Beep() in C++

C program to draw a square using graphics (clickHere)

How to make beep sound in c++

Note:- Maybe sometime above code doesn’t get user-friendly output, in codeblock ‘or’ any other EDITOR, All of C & C++ program tested in DOS compiler Turbo C.

Also Read

Types of functions in C    Read Here

I hope you will understand better if you study at M.U, in the exam of M.U you know how important this “Beep() in c++. So please don’t forget to give your valuable feedback. Go in the comment section and Give us some feedback about it.  Beep() in c++ or My website.

Our team check your every Comment per day Because your one feedback helps us in growing Thesmolt

I request you if you have any doubt or question regarding our site, then please don’t hesitate. We always waiting for your Suggestion.

Note:- If you want to Download This article’s in PDF form, then simply go (Top or Bottom of) Right corner and click on the PRINT icon, and it’s saved as a PDF of Beep() in c++

How to make the hardware beep sound with c++

For further questions, you can contact us Via mail [email protected]  otherwise, Our Help Page and Contact us Page, which is included below. I hope I’ll able to say all the possible ways to reach us. Or Download My Android Application Below Download Button.

thesmolt App

Leave a Reply

x