Cody

# Problem 43283. Subtract integers and add doubles

Solution 1696792

Submitted on 19 Dec 2018
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   Fail
a = int8(1); b = int8(2); c = intOrfloat(a, b) assert(isequal(c,-1))

Output argument "c" (and maybe others) not assigned during call to "intOrfloat". Error in Test1 (line 3) c = intOrfloat(a, b)

2   Fail
a = 1; b = 2; c = intOrfloat(a, b) assert(isequal(c,3))

Output argument "c" (and maybe others) not assigned during call to "intOrfloat". Error in Test2 (line 3) c = intOrfloat(a, b)

3   Fail
a = uint8(1); b = uint8(2); c = intOrfloat(a, b) assert(isequal(c,0))

Output argument "c" (and maybe others) not assigned during call to "intOrfloat". Error in Test3 (line 3) c = intOrfloat(a, b)

4   Fail
a = int16(100); b = int16(200); c = intOrfloat(a, b) assert(isequal(c,-100))

Output argument "c" (and maybe others) not assigned during call to "intOrfloat". Error in Test4 (line 3) c = intOrfloat(a, b)

5   Fail
a = single(100); b = single(200); c = intOrfloat(a, b) assert(isequal(c,300))

Output argument "c" (and maybe others) not assigned during call to "intOrfloat". Error in Test5 (line 3) c = intOrfloat(a, b)