Cody

Solution 83303

Submitted on 27 Apr 2012 by @bmtran
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
financial.startingSalary = 50000; financial.investRate = 0.1; financial.returnRate = 0.1; financial.raiseRate = 0.05; financial.goal = 1000000; y_correct = 29; assert(isequal(calculateRetirementYear(financial),y_correct))
2   Pass
%% financial.startingSalary = 60000; financial.investRate = 0.12; financial.returnRate = 0.1; financial.raiseRate = 0.05; financial.goal = 1000000; y_correct = 26; assert(isequal(calculateRetirementYear(financial),y_correct))
3   Pass
%% financial.startingSalary = 60000; financial.investRate = 0.12; financial.returnRate = 0.1; financial.raiseRate = 0.05; financial.goal = 2000000; y_correct = 32; assert(isequal(calculateRetirementYear(financial),y_correct))
4   Pass
%% financial.startingSalary = 60000; financial.investRate = 0.12; financial.returnRate = 0.1; financial.raiseRate = 0.08; financial.goal = 2000000; y_correct = 29; assert(isequal(calculateRetirementYear(financial),y_correct))