Computer Science, asked by rishuraj03092005, 10 months ago

A Cloth showroom offers discounts in its regular stock clearance sale as per follows:
Amount of purchase
Less than or equal to 500
Greater than 500 upto 2000
Greater than 2000 upto 5000
Greater than 5000
Cloth material
3%
8%
1296
20%
Discount in %
Readymade garments
2%
5%
10%
15%
Write a Java program to accept the amount of purchase and type of purchase where 'R' indicates readymade
garments and 'C' indicates cloth material ether calculate discount and the discounted price for cloth material
or readymade garments depending on the type of purchase.​

Answers

Answered by SonalRamteke
1

Answer:

import java.io.*;

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"); 

  }

}

Answered by Anonymous
1

Answer:

Yes she is right answer

Similar questions