We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- Getting started with conditionals
Getting started with conditionals
Getting started with conditionals
Read in one character from STDIN.
If the character is 'Y' or 'y' display "YES".
If the character is 'N' or 'n' display "NO".
No other character will be provided as input.
Input Format
One character
Constraints
The character will be from the set .
Output Format
echo YES
or NO
to STDOUT.
Sample Input
y
Sample Output
YES