From c167698c3072a3f83ae8700beb033824635eb373 Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Fri, 1 Aug 2025 13:46:07 -0400 Subject: [PATCH] Initial Commit --- .gitignore | 3 +++ CollatzConj.sln | 25 +++++++++++++++++++++++ CollatzConj/CollatzConj.csproj | 8 ++++++++ CollatzConj/Program.cs | 36 ++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 .gitignore create mode 100644 CollatzConj.sln create mode 100644 CollatzConj/CollatzConj.csproj create mode 100644 CollatzConj/Program.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..74043c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/*/obj/ +/*/bin/ +/.vs/ diff --git a/CollatzConj.sln b/CollatzConj.sln new file mode 100644 index 0000000..ce07f61 --- /dev/null +++ b/CollatzConj.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30907.101 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CollatzConj", "CollatzConj\CollatzConj.csproj", "{0AC3AAC4-9C41-4733-8EE7-9639E69F1995}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0AC3AAC4-9C41-4733-8EE7-9639E69F1995}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0AC3AAC4-9C41-4733-8EE7-9639E69F1995}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0AC3AAC4-9C41-4733-8EE7-9639E69F1995}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0AC3AAC4-9C41-4733-8EE7-9639E69F1995}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {50258FFC-188A-4F7E-B47C-00C60A56CF88} + EndGlobalSection +EndGlobal diff --git a/CollatzConj/CollatzConj.csproj b/CollatzConj/CollatzConj.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/CollatzConj/CollatzConj.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/CollatzConj/Program.cs b/CollatzConj/Program.cs new file mode 100644 index 0000000..b34c497 --- /dev/null +++ b/CollatzConj/Program.cs @@ -0,0 +1,36 @@ +using System; +using System.Runtime.InteropServices; + +namespace CollatzConj +{ + class Program + { + static void Main(string[] args) + { + + for (int i = 1; i <= 100; i++) + { + int x = i; + do + { + Console.Write(x + " -> "); + if (x % 2 == 0) + { + x = x / 2; + } + else if (x % 2 == 1) + { + x = 3 * x + 1; + } + + //Console.Write("HELLO GRRRRANT! "); + } while (x != 1); + + Console.WriteLine("1"); + Console.WriteLine(); + } + } + + + } +}