All pastes #995072 Raw Edit

Anonymous

public text v1 · immutable
#995072 ·published 2008-04-23 21:11 UTC
rendered paste body
	int reference = 0;

	while (reference > 500000 || reference < 400000)
	{

		if (cin >> reference)
		{
			if (reference > 500000 || reference < 400000)
			{
				cout << "\n" << endl;
				cout << "Integer out of range, try again: ";
				cout << "\n" << endl;
				continue;
			}
			hills.searchHash(reference);
		}
		else
		{
			cin.clear();
			while (cin.get() != '\n');
			cout << "\n" << endl;
			cout << "Not an integer, try again:";
			cout << "\n" << endl;
		}
	}

	cout << "\n" << endl;
	cout <<"-------------------------------"<< endl;
	cout << "\n" << endl;