005-004-001
Discount Eligibility
Easy
Problem Description
Create a program that determines discount eligibility based on age. Use the || (OR) operator to apply discount when age is 65 or above OR 12 or below.
Test Cases
※ Output examples follow programming industry standards
Input:
70
Expected Output:
Age: 70 years old Discount applied
Input:
10
Expected Output:
Age: 10 years old Discount applied
Input:
30
Expected Output:
Age: 30 years old Regular price
Input:
65
Expected Output:
Age: 65 years old Discount applied
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 9 free executions remaining
