please help me out
it's a Java programming question . class 8
Share
please help me out
it's a Java programming question . class 8
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
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);
}
}