Question: Create a simple math program that can tell if a large number is evenly divided by 2 version 1 : is the last string digit
Create a simple math program that can tell if a large number is evenly divided by
version : is the last string digit even
version : look at last bit and see if it is
summing the digits until it is a single digit
is the sum of all the digits or
Version
is the last string digit 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
version
bit & this masks the last bits...
Last string digit is or
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
Each digit is points maximum, See the Rubric for weights. Each digit should have its own function. Reuse of code
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
