Computer Science, asked by bhavish007, 7 months ago

Write a java program that will allow the cashier to input Marked Price of product. The shop keeper offers successive discounts as 50% + 75% on the Marked Price. Calculate and display the successive discount and Selling Price.​

Answers

Answered by swayamprabhanayaksp
0

Explanation:

A: Discount is defined as the reduction in the price something you sell to the customers. Most of the discount rate is given in percentage rate.

Here is the formula to calculate the discount:

Discount = List price x Discount Rate

For example :

A pen costs 50$ and it is been sold at a discount of 12%, what is the discount price of the pen?

A: = 50 x 12/100

= 50 × 0.12

Answered by v180207
0

Explanation:

import java .io.*;

public class Marked Price

{

public static void main(String[] args)

{

DataInputStream in= new DataInputStream(System.in);

double mp,d1,d2,nmp,sp;

mp=d1=d2=nmp=sp=0.0;

try

{

System.out.print("Enter Marked Price of Product : ");

mp=Double.parseDouble(in.readLine());

d1 = (50/100.0)*mp;

nmp = mp-d1;

d2 = (75/100.0)*nmp;

sp=nmp-d2;

System.out.println("Discount-1 @ 50% = "+d1);

System.out.println("Discount-2 @ 75% = "+d2);

System.out.println("Selling Price = "+sp);

}

catch(Exception e)

{};

}

}

Similar questions