/* Example: Capital Growth The growth of capital over years Course: IS 0012 Author: Peter Brusilovsky This program calculates the annual interest and new value of capital placed in a bank */ #include void main() { float interest_rate; /* interest rate in percents */ int capital; /* starting capital in dollars */ float annual_interest; /* annual interest in dollars */ printf("Capital ($$) and interest rate (%%xx.xx): "); scanf("%d %f",&capital, &interest_rate); annual_interest = capital * interest_rate / 100; printf("Interest %6.2f; Total %9.2f\n", annual_interest, capital + annual_interest); }