I want to draw a Line chart of the 3n+1 problem but I don't know what to do. Here's my 3n+1 program
using System;
public class Program
{
public static void Main()
{
Console.Write("Enter a number: ");
int n = Convert.ToInt32(Console.ReadLine());
while (n != 1)
{
if (0 == n % 2)
{
n = n / 2;
Console.WriteLine(n);
}
else
{
n = 3 * n + 1;
Console.WriteLine(n);
}
}
Console.WriteLine("End of program");
}
}
Help please :D Thankyou