We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1dff42 commit db55d40Copy full SHA for db55d40
1 file changed
JavaHackerrank/JavaIfElse.java
@@ -0,0 +1,29 @@
1
+import java.util.Scanner;
2
+
3
+/**
4
+ *
5
+ * @author Haseeb Ansari
6
7
+ */
8
+public class JavaIfElse {
9
10
+ public static void main(String[] args) {
11
12
+ Scanner sc = new Scanner(System.in);
13
+ int n = sc.nextInt();
14
+ String ans = "";
15
+ if (n % 2 == 1) {
16
+ ans = "Weird";
17
+ } else {
18
19
+ if (n >= 6 && n <= 20) {
20
21
22
+ ans = "Not Weird";
23
+ }
24
25
26
+ System.out.println(ans);
27
+ sc.close();
28
29
+}
0 commit comments