Initial Commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
/*/obj/
|
||||||
|
/*/bin/
|
||||||
|
/.vs/
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user