Write a Java program to print the result of the following operations

 Java Code:
   

 public class Main {
 public static void main(String[] args) {
   int w = -5 + 8 * 6;
   int x = (55 + 9) % 9;
   int y = 20 + (-3 * 5 / 8);
   int z = 5 + 15 / 3 * 2 - 8 % 3;
   System.out.print(w + "\n" + x + "\n" + y + "\n" + z);
  }
}


Post a Comment

0 Comments