Question: 6 last string digit is even divides by 3 8 Version 1 is the last string digit even ( 0 , 2 , 4 ,
last string digit is even
divides by
Version
is the last string digit even
divide by convert to number, divide, return to string
is the new value even
divide by convert to number, divide, return to string
is the new value even
version
look at last bit, is it
bit shift left
is the last bit
bit shift left
is the last bit
version
are the last bits this masks the last bits not bit &
version
is if divisible by see above
divide by
is the new result divisible by
version
using the algorithm for divide by test to see if the final single digit string is or
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
