please help me out
it's a Java programming question . class 8
Answers
Answer:
There is nothing to delete the answer. It is the truth. You have misunderstood. This is not a Java question. Please check your question.
Explanation:
Answer:
import java.util.Scanner;
class Bill
{
public static void cal()
{
Scanner sc=new Scanner ( System.in);
System.out.println("Enter the price here");
double p=sc.nextDouble();
double d; // Variable for discount
//Calculation
if(p<=500)
{
d=p*10/100.0;
}
else if(p>500 && p<=1000)
{
d=p*15/100.0;
}
else if(p>1000)
{
d=p*25/100.0;
}
double bill=p-d;
System.out.println("Your bill is =" +bill);
}
}