Interest calculation in C Language
Sample program : interest calculation Consider the program, which calculates the value of money at the end of each year of investment, assuming an interest rate of 11 percent and prints the year and the corresponding amount, in two columns. The output is shown in fig 2 for period of 10 years with an initial investment of 5000.00. The program uses the following formula : Value at the end of year = value at start of year (1+interest rate) In the program, the variable value represents the value of money at the end of the year while amount represents the value of money at the start of the year. The statement amount = value ; makes the value at the end of the current year as the value at start of the next year. Let us consider the new features introduced in this program. The second and third lines begin with #define instructions. A #def...