-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathburc.java
More file actions
122 lines (106 loc) · 3.39 KB
/
burc.java
File metadata and controls
122 lines (106 loc) · 3.39 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import java.util.Scanner;
public class burc {
public static void main(String[] args) {
int month, day;
String burc= "";
boolean isError = false;
Scanner inp = new Scanner(System.in);
System.out.print("Dogdugunuz ay : ");
month = inp.nextInt();
System.out.print("Dogdugunuz gun : ");
day = inp.nextInt();
if (month == 1) {
if (day > 0 && day <= 21) {
burc= "Oglak";
} else if (day > 0 && day <= 31) {
burc= "Kova";
} else
isError = true;
} else if (month == 2) {
if (day > 0 && day <= 19) {
burc= "Kova";
} else if (day > 0 && day <= 29) {
burc= "Balik";
} else
isError = true;
} else if (month == 3) {
if (day > 0 && day <= 20) {
burc= "Balik";
} else if (day > 0 && day <= 31) {
burc= "Koc";
} else
isError = true;
} else if (month == 4) {
if (day > 0 && day <= 20) {
burc= "Koc";
} else if (day > 0 && day <= 30) {
burc= "Boga";
} else
isError = true;
} else if (month == 5) {
if (day > 0 && day <= 21) {
burc= "Boga";
} else if (day > 0 && day <= 31) {
burc= "Ikizler";
} else
isError = true;
} else if (month == 6) {
if (day > 0 && day <= 22) {
burc= "Ikizler";
} else if (day > 0 && day <= 30) {
burc= "Yengec";
} else
isError = true;
} else if (month == 7) {
if (day > 0 && day <= 22) {
burc= "Yengec";
} else if (day > 0 && day <= 31) {
burc= "Aslan";
} else
isError = true;
} else if (month == 8) {
if (day > 0 && day <= 22) {
burc= "Aslan";
} else if (day > 0 && day <= 31) {
burc= "Basak";
} else
isError = true;
} else if (month == 9) {
if (day > 0 && day <= 22) {
burc= "Basak";
} else if (day > 0 && day <= 30) {
burc= "Terazi";
} else
isError = true;
} else if (month == 10) {
if (day > 0 && day <= 22) {
burc= "Terazi";
} else if (day > 0 && day <= 31) {
burc= "Akrep";
} else
isError = true;
} else if (month == 11) {
if (day > 0 && day <= 21) {
burc= "Akrep";
} else if (day > 0 && day <= 30) {
burc= "Yay";
} else
isError = true;
} else if (month == 12) {
if (day > 0 && day <= 21) {
burc= "Yay";
} else if (day > 0 && day <= 31) {
burc= "Oglak";
} else
isError = true;
}
if ((month > 12) || (month < 1)) {
System.out.println("Hatali giris");
} else if (isError) {
System.out.println("Hatali giris");
} else {
System.out.println("Burcunuz : " + burc);
}
inp.close();
}
}