fork(3) download
  1. class ArithmeticDemo {
  2.  
  3. public static void main (String[] args)
  4. {
  5. int result;
  6. result=-2 + 5 * 7- 7 / 2 % 5;
  7. System.out.println("The result is: " + result);
  8. }
  9. }
Success #stdin #stdout 0.08s 27828KB
stdin
class ArithmeticDemo {

    public static void main (String[] args)
       {
           int result;
           result=-2 + 5 * 7- 7 / 2 % 5;
           System.out.println("The result is: " + result);
       }
}
stdout
The result is: 30