<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Multiple loops </title>
    <link>http://www.mapleprimes.com/questions/35792-Multiple-Loops-</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 09:46:05 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 09:46:05 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Multiple loops </description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Multiple loops </title>
      <link>http://www.mapleprimes.com/questions/35792-Multiple-Loops-</link>
    </image>
    <item>
      <title>syntax or algorithm ?</title>
      <link>http://www.mapleprimes.com/questions/35792-Multiple-Loops-?ref=Feed:MaplePrimes:Multiple loops :Comments#answer45143</link>
      <itunes:summary>This should implement your algorithm:

restart;
w:= 4:
w1_lst:=NULL:

for k from 1 to 10 do
  for h from 1 to 20 do
    for a from 4 to 15 do
      w1:= a + h:  #h, not hk
      w1_lst:=w1_lst,w1:
       if  w1&lt; w then w:=w1:
       else w:= w:  #redundant
       end if:
    end do:
  end do:
end do;

w1_lst;

But your algorithm is wrong in at least two regards: first you used h as a loop counter but hk inside the loop. Second, the "else"  statement is redundant, so maybe you wanted to do something different or maybe you just don't need it.
</itunes:summary>
      <description>This should implement your algorithm:

restart;
w:= 4:
w1_lst:=NULL:

for k from 1 to 10 do
  for h from 1 to 20 do
    for a from 4 to 15 do
      w1:= a + h:  #h, not hk
      w1_lst:=w1_lst,w1:
       if  w1&lt; w then w:=w1:
       else w:= w:  #redundant
       end if:
    end do:
  end do:
end do;

w1_lst;

But your algorithm is wrong in at least two regards: first you used h as a loop counter but hk inside the loop. Second, the "else"  statement is redundant, so maybe you wanted to do something different or maybe you just don't need it.
</description>
      <guid>45143</guid>
      <pubDate>Sat, 06 Feb 2010 05:25:19 Z</pubDate>
      <itunes:author>longrob</itunes:author>
      <author>longrob</author>
    </item>
    <item>
      <title>whitespace</title>
      <link>http://www.mapleprimes.com/questions/35792-Multiple-Loops-?ref=Feed:MaplePrimes:Multiple loops :Comments#answer45144</link>
      <itunes:summary>My code above was indented when I posted it, and the indents are still there when I edit it; only they disappear when displayed  after posting. What's up with that ?</itunes:summary>
      <description>My code above was indented when I posted it, and the indents are still there when I edit it; only they disappear when displayed  after posting. What's up with that ?</description>
      <guid>45144</guid>
      <pubDate>Sat, 06 Feb 2010 05:27:30 Z</pubDate>
      <itunes:author>longrob</itunes:author>
      <author>longrob</author>
    </item>
    <item>
      <title>thanks</title>
      <link>http://www.mapleprimes.com/questions/35792-Multiple-Loops-?ref=Feed:MaplePrimes:Multiple loops :Comments#answer45146</link>
      <itunes:summary>&lt;p&gt;the algorithm works! thanks a lot&lt;/p&gt;
&lt;pre&gt;
 
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;the algorithm works! thanks a lot&lt;/p&gt;
&lt;pre&gt;
 
&lt;/pre&gt;</description>
      <guid>45146</guid>
      <pubDate>Sat, 06 Feb 2010 16:08:53 Z</pubDate>
      <itunes:author>lovinash</itunes:author>
      <author>lovinash</author>
    </item>
    <item>
      <title>formatted</title>
      <link>http://www.mapleprimes.com/questions/35792-Multiple-Loops-?ref=Feed:MaplePrimes:Multiple loops :Comments#comment45145</link>
      <itunes:summary>&lt;p&gt;Change the Format to &amp;quot;formatted&amp;quot; instead of Normal.&lt;/p&gt;
&lt;pre&gt;
restart;

w:= 4:

w1_lst:=NULL:&lt;/pre&gt;
&lt;pre&gt;
for k from 1 to 10 do

  for h from 1 to 20 do

    for a from 4 to 15 do

      w1:= a + h:  #h, not hk

      w1_lst:=w1_lst,w1:

       if  w1&amp;lt; w then w:=w1:

       else w:= w:  #redundant

       end if:

    end do:

  end do:

end do;&lt;/pre&gt;
&lt;p&gt;w1_lst;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Change the Format to &amp;quot;formatted&amp;quot; instead of Normal.&lt;/p&gt;
&lt;pre&gt;
restart;

w:= 4:

w1_lst:=NULL:&lt;/pre&gt;
&lt;pre&gt;
for k from 1 to 10 do

  for h from 1 to 20 do

    for a from 4 to 15 do

      w1:= a + h:  #h, not hk

      w1_lst:=w1_lst,w1:

       if  w1&amp;lt; w then w:=w1:

       else w:= w:  #redundant

       end if:

    end do:

  end do:

end do;&lt;/pre&gt;
&lt;p&gt;w1_lst;&lt;/p&gt;</description>
      <guid>45145</guid>
      <pubDate>Sat, 06 Feb 2010 05:34:43 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
  </channel>
</rss>