+ 1

How to pass 2 integers into switch statement?

using some kind of concatenation without using string concat...n, is it possible to create value to be able to be passed into the switch?

10th May 2020, 12:33 AM
Tom
Tom - avatar
3 Answers
+ 2
Exactly what do you doing?
10th May 2020, 12:52 AM
Jobemar Arreaza
Jobemar Arreaza - avatar
+ 1
Yeah! I have 2 values x and y if (x, y)= (0,0) print 0 if (x, y)= (0,1) print 1 if (x, y)= (1,0) print 1 if (x, y)= (1,1) print 0 xnor logic Any suggestions how to get it done over case??
10th May 2020, 11:02 AM
Tom
Tom - avatar
0
if(x==y) {print 0 } else {print 1} this will be correct.
10th May 2020, 9:45 PM
Jobemar Arreaza
Jobemar Arreaza - avatar