please check the test suite.
You must call the function like this:
your_fcn_name()
*** without "x" ***
%Well, I got the output right in MATLAB...
% 'x' here, i used as the no. of digits for which the condtional operatorion is to be done
y=0;
a=(10^(x-1));
b=(10^x)-1;
for i=a:b
if rem(sum(mod(i,10.^(1:x))),2)==1
y=y+1;
end
end
%ALL THE BEST SOLVERS
Please assign value to x in test case, or remove it from function call.
Really??
3977 Solvers
134 Solvers
321 Solvers
Saving MATLAB session to a file
145 Solvers
484 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!