Skip to content

Commit

Permalink
Raise c# coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 29, 2024
1 parent b8b95e5 commit 1221c84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions csharp/Euler/p0009.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ namespace Euler
{
public class p0009 : IEuler
{
private const int MAX = 500;
public Task<Int64> Answer()
{
for (int c = 3; c < MAX; c++)
for (int c = 3; ; c++)
{
int c_square = c * c;
for (int b = 2; b < c; b++)
Expand All @@ -38,7 +37,6 @@ public Task<Int64> Answer()
}
}
}
return Task.FromResult<Int64>(0);
}
}
}
6 changes: 1 addition & 5 deletions csharp/Euler/p0017.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ static String to_string(Int64 n)
{
if (n >= 1000)
{
string thousands = to_string(n / 1000 % 100) + " thousand";
if (n % 1000 != 0)
return thousands + " " + to_string(n % 1000);
return thousands;
return to_string(n / 1000 % 100) + " thousand";
}
else if (n >= 100)
{
Expand Down Expand Up @@ -88,7 +85,6 @@ static String to_string(Int64 n)
}
switch (n)
{
case 0: return "zero";
case 1: return "one";
case 2: return "two";
case 3: return "three";
Expand Down

0 comments on commit 1221c84

Please sign in to comment.