Cody

Problem 601. Retirement savings

Solution 3190036

Submitted on 13 Oct 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Fail
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))

ans = 1000000

Output argument "year" (and maybe others) not assigned during call to "calculateRetirementYear".

2   Fail
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))

ans = 1000000

Output argument "year" (and maybe others) not assigned during call to "calculateRetirementYear".

3   Fail
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))

ans = 1000000

Output argument "year" (and maybe others) not assigned during call to "calculateRetirementYear".

Suggested Problems

More from this Author52

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!