forked from PrafullRaj/Hactober2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAstrologer_Foolu.java
75 lines (72 loc) · 3.22 KB
/
Astrologer_Foolu.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import java.util.*;
public class astrologer {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int date = sc.nextInt();
int month = sc.nextInt();
switch (month) {
case 1:
if ((date >= 22 && date <= 31) || (date >= 1 && date <= 19)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 2:
if ((date >= 20 && date <= 31) || (date >= 1 && date <= 18)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 3:
if ((date >= 19 && date <= 29) || (date >= 1 && date <= 20)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 4:
if ((date >= 21 && date <= 31) || (date >= 1 && date <= 19)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 5:
if ((date >= 20 && date <= 30) || (date >= 1 && date <= 20)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 6:
if ((date >= 21 && date <= 31) || (date >= 1 && date <= 20)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 7:
if ((date >= 21 && date <= 30) || (date >= 1 && date <= 22)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 8:
if ((date >= 23 && date <= 31) || (date >= 1 && date <= 22)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 9:
if ((date >= 23 && date <= 31) || (date >= 1 && date <= 22)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 10:
if ((date >= 23 && date <= 30) || (date >= 1 && date <= 22)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 11:
if ((date >= 23 && date <= 31) || (date >= 1 && date <= 21)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
case 12:
if ((date >= 22 && date <= 31) || (date >= 1 && date <= 21)) {
System.out.println("Astrological sign for " + date + "-" + month + "is Capricon");
break;
}
default:
System.out.println("Invalid Date/Month");
}
}
}