std.check.integers: src/check_integers.cpp
#include "Check"
using namespace std;
using namespace Check;
int main(int argc, char *argv[])
{
init(argc, argv);
int number;
size_t count = 1;
try
{
answer >> noFailAtEnd;
while (answer >> number)
{
output >> ensure(number);
++count;
}
}
catch (const UnhopedDataError &error)
{
exit(WrongAnswer, "%s at number %d", error.message().c_str(), count);
}
quit(SolutionAccepted);
}