Java If-Else | HackerRank | Complete Code | All Test Case Passed |

Опубликовано: 18 Октябрь 2024
на канале: Engineering Remedies
590
3

Given an integer, N , perform the following conditional actions:

If N is odd, print Weird
If N is even and in the inclusive range of to , print Not Weird
If N is even and in the inclusive range of to , print Weird
If N is even and greater than , print Not Weird
Complete the stub code provided in your editor to print whether or not is weird.

Input Format
A single line containing a positive integer, N .
Output Format
Print Weird if the number is weird; otherwise, print Not Weird.

#HackeRank
#HackeRankcode
#java
#Shorts