Skip to content

Commit beaf0e8

Browse files
committedFeb 29, 2024
refactoring
1 parent 7ec8ff4 commit beaf0e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/com/github/jonathanbirkey/chapter03/Exercise21.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public static void main(String[] args) {
3232
int year = input.nextInt();
3333
System.out.print("Enter month: 1-12: ");
3434
int m = input.nextInt();
35-
input.close();
3635

3736
if (m < 3) {
3837
m += 12;
@@ -42,6 +41,7 @@ public static void main(String[] args) {
4241
int k = year % 100;
4342
System.out.print("Enter the day of the month: 1-31: ");
4443
int q = input.nextInt();
44+
input.close();
4545
int h = (q + ((26 * (m + 1)) / 10) + k + (k / 4) + (j / 4) + 5 * j) % 7;
4646
switch (h) {
4747
case 0:

0 commit comments

Comments
 (0)
Please sign in to comment.