reduced while condition
used class methods
calculates difference between simple and compound interest