MULTIPLY PERCANTAGE VALUES

Nigel Bunyan

Total Post:20

Points:140
Posted by  Nigel Bunyan
Java 
 492  View(s)
Ratings:
Rate this:
I need to multiply a double value by 12%, how can I do so?

public class AnnualMaintenanceFee {
  public void GetTotal(int TotalND) {
    double software=1500;
    double TNDWithSof= 1500+TotalND;
    double AMF= TNDWithSof 12;
    System.out.println("New Total: "+AMF);
  }
}
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: Multiply percantage values

    We can do it like this 

    double AMF= TNDWithSof * 0.12; // 0.12 means 12/100(12%), you can use 0.12 directly
    System.out.println("New Total: "+AMF);

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!