Cody

Solution 2067583

Submitted on 23 Dec 2019 by Asif Newaz
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
x = 1.33; y_correct = [1 1 3]; assert(isequal(MixedFraction(x),y_correct))

y = 0.3300 y = 0.6600 y = 0.9900

2   Pass
x = 1.66; y_correct = [1 2 3]; assert(isequal(MixedFraction(x),y_correct))

y = 0.6600 y = 1.3200 y = 1.9800

3   Pass
x = 2.33; y_correct = [1 4 3]; assert(isequal(MixedFraction(x),y_correct))

y = 1.3300 y = 2.6600 y = 3.9900

4   Pass
x = 2.25; y_correct = [1 5 4]; assert(isequal(MixedFraction(x),y_correct))

y = 1.2500 y = 2.5000 y = 3.7500 y = 5

5   Pass
x = 2.28; y_correct = [1 9 7]; assert(isequal(MixedFraction(x),y_correct))

y = 1.2800 y = 2.5600 y = 3.8400 y = 5.1200 y = 6.4000 y = 7.6800 y = 8.9600

6   Pass
x = 2.00; y_correct = [1 5 5]; assert(isequal(MixedFraction(x),y_correct))

y = 1