Module: (Java) Subroutines: Procedures and Functions - 2


Problem

8/11

We use a logical function

Problem

Given a function that returns "True" if it got an even number and "False" if it got an odd number.
Using this function, write a program that asks the keyboard for a natural number, and if it is odd, then displays the number by 1 more than the original one, otherwise it displays the original number itself