1.

A computer peripheral company annoces a special offer to their customers on purchasing laptops and printers. computer discount=10%, printer discount = 5%. Write program ​

Answer»

//To FIND the discount on computer and printer using BlueJ technique

import java.util.*;

public class Computer

{

public static void main (STRING args [])

{

int r1 = 15, R2 = 10;

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);

}

}



Discussion

No Comment Found