Write a function printStatus()
that takes an int
argument. If the value is 0 or 1,
it should print "neither prime nor composite"
. If the value is 2, 3, 5, or 7, it should
print "prime"
. If the value is 4, 6, 8, or 9, it should print "composite"
. If it is any
other value, it should print "out of range"
. Use a switch
statement.
Stuck? You may find these lessons helpful: