Cody

Solution 1426671

Submitted on 28 Jan 2018 by Jihye Sofia Seo
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
income = 0; tax_correct = 0; assert(isequal(taxFor(income),tax_correct))

taxten = 0 taxtwenty = 0 taxthirty = 0

2   Pass
income = 100; tax_correct = 10; assert(isequal(taxFor(income),tax_correct))

taxten = 100 taxtwenty = 0 taxthirty = 0

3   Pass
income = 1000; tax_correct = 100; assert(isequal(taxFor(income),tax_correct))

taxten = 1000 taxtwenty = 0 taxthirty = 0

4   Pass
income = 2000; tax_correct = 200; assert(isequal(taxFor(income),tax_correct))

taxten = 2000 taxtwenty = 0 taxthirty = 0

5   Pass
income = 2500; tax_correct = 300; assert(isequal(taxFor(income),tax_correct))

taxten = 2500 taxtwenty = 0 taxthirty = 0 taxten = 2000 taxtwenty = 500

6   Pass
income = 3000; tax_correct = 400; assert(isequal(taxFor(income),tax_correct))

taxten = 3000 taxtwenty = 0 taxthirty = 0 taxten = 2000 taxtwenty = 1000

7   Pass
income = 5000; tax_correct = 1000; assert(isequal(taxFor(income),tax_correct))

taxten = 5000 taxtwenty = 0 taxthirty = 0 taxten = 2000 taxtwenty = 3000 taxtwenty = 1000 taxthirty = 2000

8   Pass
filetext = fileread('taxFor.m'); assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden')