volume_mute

What is the result of the following calculation?

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

volume_mute
public class Main {
  public static void main(String[] args) {
    // Write your code here
    int a = 3;
    int b = 4;
    int c = 5;
    System.out.println(a + b * c + b);
  }
}

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