Question: Draw a flowchart for a program called doubleEvenDigits ( number ) that accepts a number and extracts every other digit and then multiplies it by

Draw a flowchart for a program called doubleEvenDigits(number) that accepts a number and extracts every other digit and then multiplies it by 2, starting with the numbers second-to-last digit. Your function should accept a number and return an array of numbers. For example, if the input is 4003605040302014, the second to last digit is 1. Every other digit that follows is 2,3,4,5,6,0 and finally 4. The output array, in this case, should therefore be [4,6,8,10,12,0,8].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!