#include #include bool testCondition(int theIntVariable); void increaseArgument(int& theArg); int main(int argc, char** argv) { int n; if (argc < 2) { std::cerr << "need one argument on command line" << std::endl; exit(1); } n = atoi(argv[1]); for(int i = 0; i < n; i++) { if (testCondition(i)) { std::cout << "yes" << std::endl; } else { std::cout << "no" << std::endl; } } int j = 0; while(j < n) { j++; increaseArgument(j); std::cout << "j = " << j << std::endl; } } bool testCondition(int theIntVariable) { if (!(theIntVariable == 0 || (theIntVariable > 5 && theIntVariable % 2 == 1))) { return true; } else { return false; } } void increaseArgument(int& theArg) { theArg++; }