cout << "Please enter a positive integer: "; cin >> theNumber; while (theNumber <= 0) { cout << "It must be a positive integer! Try again: "; cin >> theNumber; }
The random numbers were between 1 and 365 inclusive. Thus 33 would be Ground Hog's Day (Feb 2nd) and 364 would be December 30th or New Year's Eve Eve.
[jacobson@weblab cpp]$ ./a.out 5 33 80 80 92 127 134 145 150 162 176 182 183 185 190 197 218 224 227 235 259 280 339 Group had repeat birthday