From 66bf210b66eb6fa9f12950d10e86b11e916f995f Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Sun, 18 Aug 2024 22:59:29 -0500 Subject: [PATCH] Fix typos --- csharp/Euler/p0019.cs | 9 ++++++--- java/src/main/java/euler/p0019.java | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/csharp/Euler/p0019.cs b/csharp/Euler/p0019.cs index 7258ee90..70d39842 100644 --- a/csharp/Euler/p0019.cs +++ b/csharp/Euler/p0019.cs @@ -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; } } diff --git a/java/src/main/java/euler/p0019.java b/java/src/main/java/euler/p0019.java index a177c51f..0acafa73 100644 --- a/java/src/main/java/euler/p0019.java +++ b/java/src/main/java/euler/p0019.java @@ -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; } }