Calculating a discount java
<pre><code>import java.util.Scanner;

public class Detyra15
{
    public static void main (String []args)
    {
        int percentage = 0;
        double releasevalue = 0;
        double discountedcost = 0;

    Scanner sc = new Scanner(System.in);

    System.out.print("Shtyp cmimin e produktit te pare: ");
    double pr1 = sc.nextDouble();

    System.out.print("Shtyp cmimin e produktit te dyte: ");
    double pr2 = sc.nextDouble();

    System.out.print("Shtyp cmimin e produktit te trete: ");
    double pr3 = sc.nextDouble();

    System.out.print("Shtyp cmimin e produktit te katert: ");
    double pr4 = sc.nextDouble();

    System.out.print("Shtyp cmimin e produktit te peste: ");
    double pr5 = sc.nextDouble();

    double COST = (pr1 + pr2 + pr3 + pr4 + pr5);

    if(COST &gt;= 20 &amp;&amp; COST &lt; 60)
    {
        percentage = 10;
        releasevalue = (COST*(10.0/100.0));
    }
    else if(COST &gt;= 60 &amp;&amp; COST &lt; 100)
    {
        percentage = 20;
        releasevalue = (COST*(20.0/100.0));
    }
    else{
        percentage = 30;
        releasevalue = (COST*(30.0/100.0));
    }

    discountedcost = COST - releasevalue;
</code></pre>

<p>This its the code that i've done, but the problem is at the PERCENTAGE, i need to use percentage as a constant value? If i put at the int percentage = 0; final than i can't do at the if else percentage 10 20 30.... how to do that? I need the percentage only 10% 20% 30%...</p>

<p>UPDATE=== I'VE DONE!!!
Thankyou</p>