pleseeee help, my teacher will kill me if I can't turn this in.
Attachments:
Answers
Answered by
1
Answer:
import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter cost of Item:");
double cost = in.nextDouble();
int discount=0;
if(cost>10000)
{
discount=50;
}
else if(cost>=5001 && cost <=10000 )
{
discount=35;
}
else if(cost>=2001 && cost <=5000 )
{
discount=25;
}
else if(cost<2000)
{
discount=5;
}
double totalamount=cost-(cost*discount/100);
System.out.println("discount amount: "+totalamount);
}
}
Explanation:
Answered by
6
Are you army.........
Similar questions