Computer Science, asked by armanpuri08, 5 months ago

Give output of: int m = ( ( 3+2) % 3 < (2*2) % 3) ? 5%2 : 6:3 ); System.out.println(m);​

Answers

Answered by akhiwaghtech
0

Answer:

1 is the output

Explanation:

first we will convert this to if else

it will be

if( ( ( 3 + 2 ) % 3 ) < ( (2*2) % 3 ) ){

int m = 5%2

}

else{

int m = 6%3;

}

by solving if statement the condition evaluates to true then the of part will be executed. then m = 5%2 = 1

Similar questions