Wrong Inputs will cause the program to exit
<p>Look at this code:</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
int main()
{
    string s;
    int n;
    float x;
again:
    cout &lt;&lt; "Please Type this: ABC456 7.8 9 XYZ\n";
    cin &gt;&gt; s &gt;&gt; n &gt;&gt; x &gt;&gt; s;
    cout &lt;&lt; "\nDo you want to try Again(y/n)? ";
    char t;
    cin &gt;&gt; t;
    if (t=='y' || t=='Y')
        goto again;
    return 0;
}
</code></pre>

<p>Just try to type "ABC456 7.8 9 XYZ" and press enter, it will cause the program exit before prompting the user to try again. I know the inputs are wrong and they are not in their types, but why it causes the exit? and how to avoid such exit?</p>
