Question: What is the value of n and counter when code is executed? n=256; counter=1; while n ~=8 if rem (counter, 2) =0 n=n/2; else

What is the value of n and counter when code is executed?  

What is the value of n and counter when code is executed? n=256; counter=1; while n ~=8 if rem (counter, 2) =0 n=n/2; else end n=n/4; counter-counter+1; end

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!