Tag Archives: Method

Java calculate discount

The program asks for a price, checks if it is higher than 1000. If the price is less, it checks if it’s higher than 600 and prints the discounted price or a notification that the price wasn’t high enough. CalculateDiscount.java: import java.util.Scanner; public class CalculateDiscount { public void run() { Scanner reader=new Scanner(System.in); String over6hundred=”8%”,… Read More »