This preview shows page 1. Sign up to view the full content.
Unformatted text preview: rate = 0.07; interest = principal * rate; // Compute the interest. principal = principal + interest; // Compute value of investment after one year, with interest. // (Note: The new value replaces the old value of principal.) /* Output the results. */ System.out.print("The interest earned is $"); System.out.println(interest); System.out.print("The value of the investment after one year is $"); System.out.println(principal); } // end of main() } // end of class Interest...
View Full Document
This note was uploaded on 01/15/2010 for the course CSC 115 taught by Professor Jackson during the Spring '09 term at University of Victoria.
- Spring '09