Why doesn't the code break when EOF is entered?Code:#include <iostream> using namespace std; int main() { int array[10]; int i = 0; int count = 0; cout << "Enter up to ten numbers" << endl; while (cin >> array[i++]) { count++; if (cin.eof()) break; if (i == 10) break; } cout <<"\nYour numbers are..." << endl; for (i = 0; i < count; i++) cout << array[i] << endl; return 0; }