Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 1.33;
y_correct = [1 1 3];
assert(isequal(MixedFraction(x),y_correct))
|
2 | Pass |
%%
x = 1.66;
y_correct = [1 2 3];
assert(isequal(MixedFraction(x),y_correct))
|
3 | Pass |
%%
x = 2.33;
y_correct = [1 4 3];
assert(isequal(MixedFraction(x),y_correct))
|
4 | Pass |
%%
x = 2.25;
y_correct = [1 5 4];
assert(isequal(MixedFraction(x),y_correct))
|
5 | Pass |
%%
x = 2.28;
y_correct = [1 9 7];
assert(isequal(MixedFraction(x),y_correct))
|
6 | Pass |
%% a funny one goes here
x = 2.00;
y_correct = [1 5 5];
assert(isequal(MixedFraction(x),y_correct))
|
651 Solvers
531 Solvers
343 Solvers
Count decimal digits of a number
176 Solvers
2336 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!