From 397a0ebfe9d1b41821d3c849d88483f2fc9a5dcc Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Fri, 19 Jul 2024 14:23:58 -0500 Subject: [PATCH] `dotnet format` --- csharp/Euler/p0004.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/csharp/Euler/p0004.cs b/csharp/Euler/p0004.cs index c6ffcf66..6cb610cd 100644 --- a/csharp/Euler/p0004.cs +++ b/csharp/Euler/p0004.cs @@ -18,14 +18,14 @@ namespace Euler { public class p0004 : IEuler { - private static string Reverse( string s ) + private static string Reverse(string s) { char[] charArray = s.ToCharArray(); Array.Reverse(charArray); return new string(charArray); } - private static bool IsPalindrome( Int64 x ) + private static bool IsPalindrome(Int64 x) { string rep = x.ToString(); return rep == Reverse(rep); @@ -34,10 +34,13 @@ private static bool IsPalindrome( Int64 x ) public Task Answer() { Int64 answer = 0; - for (int v = 101; v < 1000; v++) { - for (int u = 100; u < v; u++) { + for (int v = 101; v < 1000; v++) + { + for (int u = 100; u < v; u++) + { Int64 p = u * v; - if (IsPalindrome(p) && p > answer) { + if (IsPalindrome(p) && p > answer) + { answer = p; } }