Java Arithmetic Operator compute expressions

Question

We would like to write a program that displays the result of


9.5 times 4.5 - 2.5 times 3
----------------------------
    199.5 - 3.5

Code structure

public class Main {
  public static void main(String[] args) {
    //your code here
  }
}


public class Main {
  public static void main(String[] args) {

    System.out.println(((9.5 * 4.5) - (2.5 * 3)) / (199.5 - 3.5));
  }
}



PreviousNext

Related