public class MyClass {
public static void main(String args[]) {
double discount, amount, price;
price = 9880;
discount = 5; // 5%
amount = ((100 - discount) * price) / 100;
System.out.println("Amount after discount = " + amount);
}
}
/*
run:
Amount after discount = 9386.0
*/