Loops

I trying to get the result in 12 months when the user input their monthly amount with the initial amount they already have in their saving.

My console keep outputting the same price for one month 12 times.

Hey @jeanlaurore101

You have the following code:

// Create a loop
for (decimal i = 0; i<=12; i++)
{
  Console.WriteLine("This month you now have $" + total);
}

Your loop simply outputs the same thing 12 times. Perhaps you ought to be incrementing the value of total each time? :slight_smile:

// Like so:
// Create a loop
for (decimal i = 0; i<=12; i++)
{
  // Add another month of saving to the total here:
  Code to increment the total
  // Write the new total to the console:
  Console.WriteLine("This month you now have $" + total);
}