volume_mute

What is the result of the following calculation?

publish date2020/08/30 07:22:00 GMT+10

volume_mute
1 public class Main {
2 public static void main(String[] args) {
3 // Write your code here
4 int a = 3;
5 int b = 4;
6 int c = 5;
7 System.out.println(a + b * c + b);
8 }
9 }
63
27
39

Correct Answer

27

Explanation

This is more into math rules.  Based on order of operations, multiplication has to be made first, then additions. which means to solve b * c then add the result to the equation.  It is more like a + (b*c) + b


Quizzes you can take where this question appears