using System;
public class Program
{
public static void Main()
//create a variable that is equal to 1 (counter for the loop starts at 1)
var i = 1;
//create a variable where the sum is 0
var sum = 0;
// while the sum is less than 10k
while (sum < 10000)
// sum will become the total of the sum plus i(counter)
sum = sum + i;
//increase the counter by 1
i++;
}
// (what does result mean here?)...this will console log the result of the i where the sum is is still less than 10k
Console.WriteLine($"The result is {i}");
// sum = 0, 1, 3, 6, 10...
// i = 1, 2, 3, 4, 5...