Computer Science, asked by adritam8, 1 month ago

cloth showroom announced the following festival discounts on the purchase of items,
based on the total cost of the items purchased:
Total cost (in ₹) Discount
0–1000 No discount
1001–2000 5%
2001–5000 10%
>5000 15%
Write a program in BASIC to input the total cost of the items purchased and calculate
the final amount to be paid after availing the discount.

Answers

Answered by mail2rheaagr
4

Answer:

class Discount_Showroom

{  

  public static void main(String args[])throws IOException    

{    

   InputStreamReader in=new InputStreamReader(System.in);      

 BufferedReader br=new BufferedReader(in);      

  System.out.println("Please Enter the total cost");      

 int cost=Integer.parseInt(br.readLine());    

    if (cost<2000)    

   {            int a= cost*5/100;    

       int b=cost-a;          

 System.out.println("Please pay "+b);    

    }      

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

  {          

  int a=cost*25/100;    

       int b=cost-a;        

   System.out.println("Please pay "+b);      

 }    

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

  {          

 int a=cost*35/100;      

      int b=cost-a;          

 System.out.println("Please pay "+b);  

     }      

 else      

  {            int a=cost*50/100;    

       int b=cost-a;        

    System.out.println("Please pay "+b);  

     }      

  System.out.println("Thank You,Please Visit Again");  

 }

}

Similar questions