ival.cpp 344 B

12345678910111213141516
  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. registerValidation(argc, argv);
  9. inf.readInt(1, 100, "n");
  10. inf.readEoln();
  11. inf.readEof();
  12. }