Cody

Solution 1661173

Submitted on 29 Oct 2018 by William
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='sulphuric acid H2SO4'; y = 0-(2*1+4*-2); assert(isequal(y,oxno(x)))

2   Pass
x='sodium hydroxide NaOH'; y = 0-(-2+1); assert(isequal(y,oxno(x)))

3   Pass
x='methane CH4'; y = 0-(4*1); assert(isequal(y,oxno(x)))

4   Pass
x='ethane C2H6'; y = 0-(6*1)/2; assert(isequal(y,oxno(x)))

5   Pass
x='acetylene C2H2'; y = 0-(2*1)/2; assert(isequal(y,oxno(x)))

6   Pass
x='hypophosphorous acid H3PO2'; y = 1; assert(isequal(y,oxno(x)))

7   Pass
x='(ortho)phosphorous acid H3PO3'; y = 3; assert(isequal(y,oxno(x)))

8   Pass
x='pyrophosphoric acid H4P2O7'; y = 5; assert(isequal(y,oxno(x)))