Microsoft Code Hunt Query

Please tell the operation between x & y. (Hint: Use of + and / operators)

x = 1 -> y = 1 -> Output = 1

x = 2 -> y = 2 -> Output = 2

x = 2 -> y = 1 -> Output = 2

x = 2 -> y = 3 -> Output = 3

x = 2 -> y = 6 -> Output = 4

x = 3 -> y = 2 -> Output = 3

x = 6 -> y = 2 -> Output = 6

x = 3 -> y = 3 -> Output = 4

x = 6 -> y = 1 -> Output = 6

x = 2 -> y = 5 -> Output = 3

x = 3 -> y = 258 -> Output = 89

Give the Realtion between x and y

Hint: Use + and / operators.

does question is to be solved by using + nd / operator only?

yes…you have to use only + and / operator @sanmak_chef

The solution is:-
if(x==y)–>The output is either x or y.
else
output is x+(int)y/x.