your spacing is horrid.
anyway it loops forever when a non int is entered?
that means your error checking is not right.
the example below will loop forever until a integer is entered. that way you know a integer is always entered going into the while loop.
Code
while(!(cin >> num) || cin.peek() != '\n') //change num to the name of your integer
{
cout << "Please enter an INTEGER: ";
cin.clear();
cin.ignore(30000, '\n');
}