Write the definition of a function isEven , that receives an integer parameter and returns true if the parameter ‘s value is even, and false otherwise.

LANGUAGE: C++

CHALLENGE:

Write the definition of a function isEven , that receives an integer parameter and returns true if the parameter ‘s value is even, and false otherwise.

So, if the parameter ‘s value is 7 or 93 or 11 the function returns false . But if the parameter ‘s value is 44 or 126 or 7778 the function returns true.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

1 Comment

  1. HC on November 17, 2016 at 2:39 pm

    This is C code:

    int isEven(int x){
    if (x % 2 == 0) {
    return 1;
    } else {
    return 0;
    }
    }

Leave a Comment

You must be logged in to post a comment.