Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 19, 2024
1 parent 4d07762 commit 66bf210
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions csharp/Euler/p0019.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ public class p0019 : IEuler
public object Answer()
{
byte answer = 0;
for (ushort x = 1901; x < 2001; x += 1) {
for (byte y = 1; y < 13; y += 1) {
if (new DateTime(x, y, 1).DayOfWeek == DayOfWeek.Sunday) {
for (ushort x = 1901; x < 2001; x += 1)
{
for (byte y = 1; y < 13; y += 1)
{
if (new DateTime(x, y, 1).DayOfWeek == DayOfWeek.Sunday)
{
answer += 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion java/src/main/java/euler/p0019.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public Object answer() {
byte answer = 0;
for (short x = 1901; x < 2001; x += 1) {
for (byte y = 0; y < 12; y += 1) {
if (LocalDate.of(x, y, 1).DayOfWeek == DayOfWeek.Sunday) {
if (LocalDate.of(x, y, 1).getDayOfWeek() == DayOfWeek.SUNDAY) {
answer += 1;
}
}
Expand Down

0 comments on commit 66bf210

Please sign in to comment.