cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Iterative Programming.xmcd

Newbie

Iterative Programming.xmcd

To community:

The attached worksheet shows two programs.

The one on the left shows one way of repeating a calculation that works and accomplishes what it is supposed to do.

The one on the right is an attempt to0 do the same by iterating the calculations but only goes into a recursive mode.

Would like help in the proper programming procedure.

Thanks for any help

Dick.....

2 REPLIES 2
Highlighted

Re: Iterative Programming.xmcd

Please create a discussion within the community. You have created a document which does not allow other users to post worksheets.

Highlighted

Re: Iterative Programming.xmcd

You've accidentally typed the t<-t+1 outside the while loop rather than inside it (technically, it's infinitely iterating rather than recursing).  The picture below shows the effect of putting the t increment back inside the while loop.

Stuart

Announcements