Computer Science, asked by raulaharihara, 1 year ago

A shopkeeper announces two successive discounts 20% and 10% on purchasing of gooods on the marked price. Write a program to input marked price and calculate the selling price of an article

Answers

Answered by Anonymous
16
System.out.println("Gian percentage="+perc+" %");. else. System.out.println("No Profitm, No Loss");. } } /* Output: */. Enter Cost price of an ...
Answered by jyotikumari32
3

A shopkeeper announces two successive discounts 20% and 10% on purchasing of goods on the marked price. Write a program to input marked price and calculate the selling price of an article.

import java.io.*;

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