From 806ac24650a38952cf32f8f3e262962223edac94 Mon Sep 17 00:00:00 2001 From: Sachindra <47586567+therealspark9@users.noreply.github.com> Date: Tue, 11 Oct 2022 23:40:49 +0530 Subject: [PATCH] Create IfElse.java --- IfElse.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 IfElse.java diff --git a/IfElse.java b/IfElse.java new file mode 100644 index 0000000..737d935 --- /dev/null +++ b/IfElse.java @@ -0,0 +1,23 @@ +import java.util.*; + +public class IfElse { + private static final Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + int N = scanner.nextInt(); + scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); + if(N%2!=0){ + System.out.println("Weird"); + } + else if(N%2==0 && N>=2 && N<=5){ + System.out.println("Not Weird"); + } + else if(N%2==0 && N>=6 && N<=20){ + System.out.println("Weird"); + } + else if(N%2==0 && N>20){ + System.out.println("Not Weird"); + } + scanner.close(); + } +}