Back To Java Basics Index
//program to input price of an item from user and calculate discount as 10 percent on the price public class discountprice { public static void main(String[] args) { float price,discount; price=1000; discount=0.1f*price; System.out.println("10 % percent discount is " + discount); } }