int EvenOdd(int number) { if(number%2 == 0) return 0; else return 1; }
It was asked today in interview but could not crack it, any help.
a and b are compared against the threshold ‘TH’, and the nearest value is voted as output