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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Iterative Programming.xmcd

DickCun
1-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
MikeArmstrong
5-Regular Member
(To:DickCun)

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

StuartBruff
23-Emerald II
(To:DickCun)

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

Top Tags