We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ec8ff4 commit beaf0e8Copy full SHA for beaf0e8
src/com/github/jonathanbirkey/chapter03/Exercise21.java
@@ -32,7 +32,6 @@ public static void main(String[] args) {
32
int year = input.nextInt();
33
System.out.print("Enter month: 1-12: ");
34
int m = input.nextInt();
35
- input.close();
36
37
if (m < 3) {
38
m += 12;
@@ -42,6 +41,7 @@ public static void main(String[] args) {
42
41
int k = year % 100;
43
System.out.print("Enter the day of the month: 1-31: ");
44
int q = input.nextInt();
+ input.close();
45
int h = (q + ((26 * (m + 1)) / 10) + k + (k / 4) + (j / 4) + 5 * j) % 7;
46
switch (h) {
47
case 0:
0 commit comments