// Directions: Intermediate #2-1
// 1) Add code to the Main method:
// a) Create a loop that will start with 25 cents and increase in value 1%.
// b) The sum of the value of the account should accumulate. (.25 for day 1, .51 for day 2)
// c) Output the accumuluating value until the new sum is greater than 100 and the number of days.
// 2) Submit your dotnetfiddle link in Blackboard.
/* Part of my output
Day: 158: ¤1.19
Day: 159: ¤1.20
Day: 160: ¤1.22
Day: 161: ¤1.23
Day: 162: ¤1.24
Value after 162 days: ¤100.31
*/
using System;
public class Program
{
public static void Main()
double dblCents = 0.25;
double dblTotal = 0;
int intDay = 0;
while (intDay < 100 || dblTotal < 100) {
dblTotal += dblCents;
dblCents *= 1.01;
intDay += 1;
Console.WriteLine("Day: " + intDay + ": " + dblTotal.ToString("C"));
}
Console.WriteLine("Final Day: " + intDay + ": " + dblTotal.ToString("C"));