Mine
public text v1 · immutable#include <stdio.h>
int main(void)
{
float sum; // beginning total of 1 million dollars
const float x = 0.8; // interest rate
float new_total;
float interest_earned;
int year;
for ( sum = 1000000, year = 0; sum >= 100000; new_total = sum - 100000)
{
interest_earned = new_total * x;
new_total += interest_earned;
printf("year %d total funds in bank: %f\n",
year++, new_total);
}
return 0;
}