Computer Science, asked by sunissuni1986, 6 months ago

A dress showroom has announced the following discounts.On the purchase of items based on the total cost of the items purchased.

Total cost. Discount.
<2000 5%
2001>5000. 25%
5001>10000. 35%
>10000. 50%
Write a program to input total cost and to compute and to display the amount to be paid by the customer after availing the discounts.

Answers

Answered by vaishalini48
0

Answer:

May be!!!!!

Explanation:

"45 percent"

Answered by mahuakundu2020
1

Answer:

A dress showroom has announced the following discounts on the purchase of items ,based on the total cost of items purchased

Total cost Discount (%)

Less than or equal to 2000. 5%

₹2001 to ₹5000. 25%

₹5001 to ₹10000. 35%

Above ₹10000. 50%

import java.util.Scanner;

public class Discountprac0

{

public static void main(String args[])

{

Scanner in = newScanner(System.in);

double a,d,c=0;

System.out.print("Enter total cost: ");

c = in.nextDouble();

if (c < =2000)

{

d=c*.05;

a = c -d;

}

else if (c>2000 && c < =5000)

{

d=c*.25;

a = c - d;

}

else if (c>5000 && c < =10000)

{

d=c*.35;

a= c -d;

}

else

{

d=c*.5;

a = c - d;

}

System.out.println("discount is "+d);

System.out.println(" Total Amount to be paid: " + a);

}

}

Similar questions