// p03_01.cpp: Largest Integer and its frequency in a sequence 
#include <iostream>
using namespace std;

int main() {
 cout << "Enter integers, followed by a nonnumeric character:\n";
 int maxim, n = 1, x;
 cin >> maxim;
 if (!cin) cout << "Error: no integer read at all.\n";
 else
 while (cin >> x) {
  if (x > maxim) {
   maxim = x;
   ++n;
  }
 }
 cout << "Largest: " << maxim << ". This occurs " << n << " times.\n";
 return 0;
}
