Decided to try my hand at writing a recursive function today, and was able to do so, and have it work without a lot of work.
using System;
namespace Recursion
{
class Program
{
private static void recursiveLoop(int startNumber,int endNumber)
{
if (startNumber <= endNumber)
{
Console.WriteLine(startNumber);
startNumber++;
recursiveLoop(startNumber,endNumber);
}
}
static void Main(string[] args)
{
recursiveLoop(1,10000);
}
}
}
Code language: C# (cs)