ival.cpp 330 B

12345678910111213141516171819
  1. /**
  2. * Validates that input contains the only integer between 1 and 100, inclusive.
  3. * Also validates that file ends with EOLN and EOF.
  4. */
  5. #include "testlib.h"
  6. using namespace std;
  7. int main()
  8. {
  9. registerValidation();
  10. inf.readInt(1, 100, "n");
  11. inf.readEoln();
  12. inf.readEof();
  13. return 0;
  14. }