Initial Commit

This commit is contained in:
2025-08-01 13:46:07 -04:00
commit c167698c30
4 changed files with 72 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>
+36
View File
@@ -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();
}
}
}
}