Question: What is the output? Trace the algorithm (create a table) and show its steps. Step1: i=5 Step2: count=0 Step3: while (i!=1) Repeat step 3
What is the output? Trace the algorithm (create a table) and show its steps. Step1: i=5 Step2: count=0 Step3: while (i!=1) Repeat step 3 to 8 Step4: print count Step5: print i Step6: count++ Step7: if ((i%2)==0) i=i/2 Step8: else Step9: Stop i=3*i+1
Step by Step Solution
3.35 Rating (155 Votes )
There are 3 Steps involved in it
To trace the algorithm and show its steps we will create a t... View full answer
Get step-by-step solutions from verified subject matter experts
