How do I make my program beep in a loop?
<p>I need help with some code, what i want it to do is be able to make the computer 'beep' using the alert function ie: \a but I don't know how to implement it so that the user can choose how many times it beeps while using a switch statement, All help will genuinely be thanked.</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main()
{
    int x;
    int y;

    cout &lt;&lt; "Do you want to make your computer beep" &lt;&lt; endl;
    cin &gt;&gt; x;
    if (x == 'y' || x == 'Y')
    {
     cout &lt;&lt; "How many beeps do you want" &lt;&lt; endl;
     switch (y)
     {
      // This is the part i'm stuck on!!!
     }
    }

    cin.ignore();
    cin.get();
    return 0;
}
</code></pre>
