RosettaCodeData/Task/Ethiopian-multiplication/MATLAB/ethiopian-multiplication-3.m
2023-07-01 13:44:08 -04:00

6 lines
144 B
Matlab

%Returns a logical 1 if the number is even, 0 otherwise.
function trueFalse = isEven(number)
trueFalse = logical( mod(number,2)==0 );
end