phillip swag phillip swag - 3 months ago 7
Java Question

double variables adding and then subtracting 12%

So i am working with a double variable. I just need help figuring out how to add them together and then take 12% from the answer.

public class Hello {
//c
public static void main(String[ ] args) {
first_number = 10.5;
second_number = 20.8;
answer = first_number + second_number;

System.out.println("Additional Total="+ answer-12%);
}
}

Answer

Get 88% of the total

System.out.println("Additional Total = " + answer * .88);
Comments