Menu
Question Index
...

Which order should the lines M, N, O, P be changed such that the value of a is 10 and b is 70 at the end of the program. You can remove any unwanted lines.

class Operators
{
    public static void main(String s[])
    {
        int a = 31, b = 40;
        int c = b - a;
        b = c % a;        // LINE M
        b = b / a;        // LINE N
        a = ++c;        // LINE O
        b = (a - --b) * c;    // LINE P

    }
}


M, O, N
N, P, M, O
P, M, N, O
O, N, P
N, M, O

Doubts

Problems

Topic: Modulus Operator In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App