ival.cpp 362 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(int argc, char* argv[])
  8. {
  9. registerValidation(argc, argv);
  10. inf.readInt(1, 100, "n");
  11. inf.readEoln();
  12. inf.readEof();
  13. return 0;
  14. }