+ 1

[DUPLICATE] Create a function in php for even and odd!

The challenge is we cannot use any arithmetic operator, we cannot use any conditional statement and we cannot use any looping statements.

18th Mar 2018, 6:54 PM
Mohammad Saquib Siddiqui
Mohammad Saquib Siddiqui - avatar
6 Answers
+ 1
Isnt this same as if else statement? Will it be acceptable for an interview point of view?
18th Mar 2018, 7:15 PM
Mohammad Saquib Siddiqui
Mohammad Saquib Siddiqui - avatar
0
Cant use if else too. Its out of curiosity, somebody asked me in an interview.
18th Mar 2018, 7:09 PM
Mohammad Saquib Siddiqui
Mohammad Saquib Siddiqui - avatar
0
Thanks for the reply.
18th Mar 2018, 7:24 PM
Mohammad Saquib Siddiqui
Mohammad Saquib Siddiqui - avatar