+ 2

# >>>7%(5//2)=1

how is this possible can anyone give me full explanation.

7 Answers

+ 1

maby 5 is escaped so its 7%2 which equals 1 i cant be certain tho as i dont know what language this is for

+ 8

5 // 2 = 2 (integer division)
7 % 2 = 1 (modulo division)

+ 4

modulo division means the remainder. 7%2=2*3+1, so the remainder is 1.

+ 2

5 divided by 2. output is 2 and remainder is 1. now 7 divided by 2. output will be 3 and remainder will be 1. as % is modulus and modulus is remainder so answer will be 1.

0

what is modulo division @anna can you pls explain?

0

pls I don't understand integer division Anna...

0

Anna how 7-2 is 1??

Hot today

What is indentations... ?

6 Votes

int num = 2;
int x = 3;
if(num >= 2) {
if(x > 4) { num = 3; }
else { num = 4; }
}
else {x = 1; }

1 Votes

Need solution

0 Votes

About Java McQ

0 Votes

What is the best coding language

0 Votes

Need solution

0 Votes