Saving - i=input('Input the annual interest rate as a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Program 'Savings' %This program calculates how many years it will take to save $1million a=input('Input initial deposit: '); b=input('Input uniform end of year deposits: ');
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i=input('Input the annual interest rate as a decimal: '); k=0; while a<10000 k=k+1; a=a*(1+i)+b; end a k...
View Full Document

This note was uploaded on 06/30/2011 for the course ENGR 403 taught by Professor Ahn during the Spring '11 term at Birmingham-Southern College.

Ask a homework question - tutors are online