Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Loop function with conditions?' topicStudent Support Forum > General > "Loop function with conditions?"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
12/16/12 11:02pm

In[1]:= y=2;
While[True,
x=y+2;
If[x==6,Break[]];
y=x]

In[3]:= x
Out[3]= 6

URL: ,

Subject (listing for 'Loop function with conditions?')
Author Date Posted
Loop function with conditions? James 12/16/12 11:40am
Re: Loop function with conditions? Bill Simpson 12/16/12 11:02pm
Re: Loop function with conditions? James 12/17/12 12:16pm
Re: Re: Loop function with conditions? Bill Simpson 12/17/12 8:16pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic