int x = 45, y = 7, z ; system.out.println("Answer 1 :" + (x\y)); System.out.println("Answer 2:" + (x%y)); the correct answer is answer 1 = 6 and answer 2 = 3 show the method of solving
Answers
Answered by
0
Answer:
Answer 1: 6
Answer 2: 3
Explanation:
1. You printed x/y where you divided x by y (45 by 7) so it is 6.
2. You printed x%y where you got the quotient of x dividing by y so it is 3.
/ in Java divides while % in Java divides and returns the quotient
Similar questions
Math,
1 month ago
CBSE BOARD XII,
1 month ago
Computer Science,
3 months ago
Math,
10 months ago
Math,
10 months ago