Question: Discrete mathematics for computing please show all work number known as the 8 The following algorithm calculates a number kne 'digital root' of a positive

Discrete mathematics for computing  Discrete mathematics for computing please show all work number known as
please show all work

number known as the 8 The following algorithm calculates a number kne 'digital root' of a positive integer. 1. Input a positive integer n 2. d number of digits in n 3. While d> 1 do 3.1. ne sum of the digits of n 3.2. d number of digits in n 4. Output n (a) Trace the algorithm when 8678 is input. (b) List all the possible values that the output of the algorith could take

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 Databases Questions!