Computer Science, asked by malam786a, 11 months ago

E-Commerce vendor selling electronic goods given the following discount to its customers
purchase amount. discount
upto 5000. no discout
5001 to 15000. 10%
15000 to 20000. 12%
above 20000. 15%

write a program to input a purchase amount for the customers and calculate the discount amount, tax and net amount to be paid .tax is to be charged at flat 15% ​
Please urgent answer fast

Answers

Answered by The1sanegirl
0

Answer:

import java.util.*;

public class p1

{

   public static void main(String q[])

   {

       double a=0, d=0, am=0;

       Scanner z=new Scanner(System.in);

       System.out.println("Enter the total amount:");

       a=z.nextDouble();

       if(a<2000 && a==2000){

       d=(a*0.05);

       am=a-d;

       System.out.println(am);}

       if(a==2001 && a<=5000){

       d=(a*0.1);

       am=a-d;

       System.out.println(am);}

       if(a==5001 && a<=10000)

       d=(a*0.15);{

       am=a-d;

       System.out.println(am);}

       if(a>10000){

       d=(a*0.20);

       am=a-d;

       System.out.println(am);}

   

          }

       }

Explanation:

Similar questions