Skip to content

Commit

Permalink
Merge pull request #3 from Mijo-Software/202112122143
Browse files Browse the repository at this point in the history
202112122143
  • Loading branch information
mjohne authored Dec 12, 2021
2 parents b28afd9 + ee96ad1 commit 0b81fac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions EulerBrick.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<PackageLicenseFile>C:\Users\mj-pr\OneDrive\Documents\unlicense.txt</PackageLicenseFile>
<Authors>Mijo Software</Authors>
<PackageProjectUrl>https://mijo-software.de</PackageProjectUrl>
<PackageReleaseNotes>1.0.1.2</PackageReleaseNotes>
<Version>1.0.1.2</Version>
<PackageReleaseNotes>1.0.2.3</PackageReleaseNotes>
<Version>1.0.2.3</Version>
<IsPublishable>False</IsPublishable>
</PropertyGroup>

Expand Down
18 changes: 15 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ulong
n = 0,
n = 0, i = 0,
a_min = 1, b_min = 1, c_min = 1,
a_max = 1000, b_max = 1000, c_max = 1000;

Expand All @@ -21,11 +21,23 @@
if ((f % 1) == 0)
{
n++;
Console.WriteLine(value: $"{n} = {{a: {a}, b: {b}, c: {c}}}{{d: {Math.Round(a: (double)d)}, e: {Math.Round(a: (double)e)}, f: {Math.Round(a: (double)f)}}}");
if (a <= b && a <= c && b <= c)
{
i++;
Console.WriteLine(value: $"{n}|{i} = {{a: {a}, b: {b}, c: {c}}}{{d: {Math.Round(a: (double)d)}, e: {Math.Round(a: (double)e)}, f: {Math.Round(a: (double)f)}}}");
}
else
{
Console.ForegroundColor = ConsoleColor.DarkGray;
Console.WriteLine(value: $"{n}|{i} = {{a: {a}, b: {b}, c: {c}}}{{d: {Math.Round(a: (double)d)}, e: {Math.Round(a: (double)e)}, f: {Math.Round(a: (double)f)}}}");
Console.ForegroundColor = ConsoleColor.White;
}
g = Math.Sqrt(d: Math.Pow(x: a, y: 2) + Math.Pow(x: b, y: 2) + Math.Pow(x: c, y: 2));
if ((g % 1) == 0)
{
Console.WriteLine(value: $"{n} = {{a: {a}, b: {b}, c: {c}}}{{d: {Math.Round(a: (double)d)}, e: {Math.Round(a: (double)e)}, f: {Math.Round(a: (double)f)}}}{{g: {Math.Round(a: (double)g)}");
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine(value: $"{n}|{i} = {{a: {a}, b: {b}, c: {c}}}{{d: {Math.Round(a: (double)d)}, e: {Math.Round(a: (double)e)}, f: {Math.Round(a: (double)f)}}}{{g: {Math.Round(a: (double)g)}");
Console.ForegroundColor = ConsoleColor.White;
}
}
}
Expand Down

0 comments on commit 0b81fac

Please sign in to comment.