Computer Science, asked by thakuriprajawal, 1 month ago

Q4. A cloth showroom has announced the winter discount on the purchase of certain goods

Attachments:

Answers

Answered by ItzMeSam35
2

import java.util.*;

public class WinterSale

{

public static void main (String args[])

{

Scanner sc=new Scanner (System.in);

System.out.println("Please Enter The Cost");

double amount = sc.nextDouble();

if (amount <= 2000)

{

double discount = ( amount * 5 ) / 100;

double net_amount = amount - discount;

System.out.print("Discount : "+discount);

System.out.println("Net Amount : "+ net_amount);

}

else if (amount >= 2001 && amount <= 5000)

{

double discount = ( amount * 10 ) / 100;

double net_amount = amount - discount;

System.out.print("Discount : "+discount);

System.out.println("Net Amount : "+ net_amount);

}

else if (amount >= 5001 && amount <= 10000)

{

double discount = ( amount * 15 ) / 100;

double net_amount = amount - discount;

System.out.print("Discount : "+discount);

System.out.println("Net Amount : "+ net_amount);

}

else if (amount > 10000)

{

double discount = ( amount * 25 ) / 100;

double net_amount = amount - discount;

System.out.print("Discount : "+discount);

System.out.println("Net Amount : "+ net_amount);

}

sc.close();

}

}

//Please Mark As Brainiliest

Similar questions