public static void Main()
Console.WriteLine("Hello World");
Program p = new Program();
Console.WriteLine("-----"+i + "-----------");
public void getList( int start, int total, int yourPercentage, int profitPercentage)
float incrementValue = start;
float remaining = total - start;
profit = (incrementValue * profitPercentage) / 100;
Console.WriteLine(count + ") " + incrementValue + " ---- Profit = " + profit);
while (remaining > incrementValue)
value = (incrementValue / yourPercentage) * 100;
profit = ((value / profitPercentage) * 100) - value;
Console.WriteLine(count + ") " + value + " ---- Profit = " + profit);
incrementValue = incrementValue + value;
remaining = remaining - incrementValue;
if (remaining < incrementValue && total > incrementValue)
bal = total - incrementValue;
value = (incrementValue / yourPercentage) * 100;
incrementValue = incrementValue + value;
profit = ((value / profitPercentage) * 100) - value;
Console.WriteLine(count + ") " + value + " ---- Profit = " + profit);
bal = total - incrementValue;
Console.WriteLine("Balance = {0}", bal);
value = (incrementValue / yourPercentage) * 100;
profit = ((value / profitPercentage) * 100) - value;
Console.WriteLine("Next value = {0} ---- Profit = {1}", value, profit);
Console.WriteLine("Total = {0}", total);