Hi,
I wrote
package com.codegym.task.task01.task0137;
/*
Only 20 will do
*/
public class Solution {
public static int a = 1;
public static int b = 3;
public static int c = 9;
public static int d = 27;
public static void main(String[] args) {
int result = + a - b + c - d;
System.out.println(result);
}
}
To this I tried to use Math.abs() to get a positive number from negative number, but verification's last line keeps writing "incorrectly places signs".
I also tried to add a variable to add it and get positive number. The same mistake.
What's wrong?package com.codegym.task.task01.task0137;
/*
Only 20 will do
*/
public class Solution {
public static int a = 1;
public static int b = 3;
public static int c = 9;
public static int d = 27;
public static int e = 40;
public static void main(String[] args) {
int result = + a - b + c - d + e;
System.out.println(result);
}
}