Computer Science, asked by sharmabikash2693, 24 days ago

a computer manufacturing company announces special offer to the customer on purchasing laptop in product accordingly on laptop discount is 15% on printer discount is 10% write a java program to calculate the discount if a customer purchase laptop and printer.​

Answers

Answered by cjha33976
6

Answer:

A computer manufacturing company announces a special offer to their customers on purchasing Laptops and Printers accordingly:

On Laptop : Discount - 15%

On Printers : Discount - 10%

Write a program in Java to calculate the discount, if a customer purchases a Laptop and a Printer.

public class Computer

{

public static void main(String args[])

{

int r1=15;

intr2=10;

int c=25000;

int p=10000;

double d1,d2,m=0, n=0;

d1=(double)r1/100*c;

d2=(double)r2/100*p;

m=c-d1;

n=p-d2;

System.out.println("The price of Laptop after discount ="+m);

System.out.println("The price of printer after discount ="+n);

}

}

Expected Output:

The price of Laptop after discount = 21250

The price of printer after discount = 9000

Answered by omjitdbs
0

Answer:

i want the answer of printer only do any one know this plz help me

Similar questions