Home

Awesome

correct_cpp_is_odd

BranchTravis CICodecov
masterBuild Statuscodecov.io

Correct C++ chapter 'is odd'.

Goals

Prerequisites

Exercise

Write a command-line interface (CLI) program that determines if its argument is an odd number.

If there are more arguments supplied, ignore the ones beyond the first

Call to is_oddOutputExit status
./is_oddAny1
./is_odd 1true (with newline)0
./is_odd 2false (with newline)0
./is_odd nonsenseAny1
./is_odd 12345678901234567890Any1
./is_odd 2 1false (with newline)0

With 'Any' output, you can choose to:

This is the code you start with:

main(argc, argv)
{
  //Your code here
}

External links

References