A dealer allows his customer to successive discounts of 20% and 10% If the article cost rupees 7200 calculate and display the selling price and total discount given by the dealer .
give it in a java program
no spam plz
Answers
Answered by
5
Answer:
public class KboatSuccessiveDiscount
{
public static void main(String args[]) throws IOException {
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(read);
System.out.print("Enter marked price: ");
double mp = Double.parseDouble(in.readLine());
double d1 = mp * 20 / 100.0;
double amt1 = mp - d1;
double d2 = amt1 * 10 / 100.0;
double amt2 = amt1 - d2;
System.out.print("Selling Price = " + amt2);
}
}
Similar questions