I have a task in which I need to output "YES" or "NO", without using the branch operators if, switch ....
Here is the condition:
Write a program that determines whether a given point falls in the shaded area. Boundary points enter the area.
-------- | -5 ////// 1 | ----------- | 7 /////// 13 | --------- ->
Input Format
A real number x is entered, which does not exceed 105 in absolute value and is set with an accuracy of two decimal places.
Output format
Print “YES” if the coordinates of the point fall into this area, and “NO” otherwise.
Examples
Input | 10.00 | YES
Output | 0.00 | YES
I figured out how to output 1 or 0. But I don’t know how “YES” or “NO”.
PS You can not use arrays and functions
char. "use strings" and "don't use arrays" are mutually exclusive paragraphs - yrHeTaTeJlb