- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise22.java
More file actions
Latest commit
18 lines (14 loc) · 709 Bytes
/
Copy pathExercise22.java
File metadata and controls
18 lines (14 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
publicclassExercise22 {
publicstaticvoidmain(Stringarg[]) {
// Go look at a 2020 calendar. You will see that 1 Jan 2020 happens to be a Wednesday,
// 1 February 2020 happens to be a Saturday, 1 March 2020 is a Sunday, and so on.
// Write a program that asks the user to input a day and month (e.g. 8 February)
// and then prints out what day of the week that would be in 2020.
System.out.print("Enter a date in 2020 (for example, \"8 February\"): ");
intdayOfMonth = StdIn.readInt();
StringmonthName = StdIn.readString();
StringnameOfDay;
// Your code goes here
System.out.println("That date will fall on a " + nameOfDay)
}
}