import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//CHECKING IF A NUMBER IS EVEN OR ODD
Scanner scanner = new Scanner(System.in);
System.out.println("Please enter the total value of the purchase:");
int totalValue = scanner.nextInt();
int discount = totalValue*10/100;
int newValue = totalValue-discount;
int missingForDiscount = 100-totalValue;
if (totalValue>=100) {
System.out.println("10% discount applied. New total value is $" + newValue);
} else {
System.out.println("Total value is not enough for discount, total value to pay is $" + totalValue + ". You can add $" + missingForDiscount + " or more to get the 10% discount");
}
}}