Pursuant to the first problem in this series, this one involves checking for divisibility by 4.
Write a function to determine if a number is divisible by 4. This can be checked by a few slightly different methods:
Previous problem: divisible by 3. Next problem: divisible by 5.
In general, this solution is not valid for single digit numbers.
code won't work for 0,4,8 I just took advantage of test code :(
If input n_str = < '9', then you get Error: Subscript indices must either be real positive integers or logicals.
851 Solvers
299 Solvers
469 Solvers
Getting the indices from a vector
1443 Solvers
Who is the smartest MATLAB programmer?
469 Solvers