<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1037480" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1037480</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/c-programming-problem-looping#comment-1214877</link>
    <description> &lt;p&gt;That&#039;s the right idea, however I would suggest a slightly more elegant version:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;for(voltage = init_voltage; voltage &amp;lt;= end_voltage; voltage += increm_voltage)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts(&amp;quot;Table Heading&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;------------------------------------&amp;quot;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(res = init_res; res &amp;lt;= end_res; res += increm_res)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&amp;quot;&amp;nbsp;&amp;nbsp; %f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %f&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %f&amp;nbsp;&amp;nbsp; \n&amp;quot;, voltage, res, voltage / res);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; }&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;The name [incode]init_res[/incode] is suggestive of a constant or parameter, something you don&#039;t want to destructively modify -- indeed, doing so caused your problem.  It also doesn&#039;t represent the physics expression very well (init_voltage should mean initial voltage, not present voltage).&lt;/p&gt;
&lt;p&gt;Assigning a variable ([incode]voltage[/incode] or [incode]res[/incode]) in the loop is handier since you don&#039;t have to manually reset anything, and it&#039;s just more readable.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Feb 2007 12:13:09 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1214877 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/c-programming-problem-looping#comment-1214844</link>
    <description> &lt;p&gt;All I needed was a break (as in time away from the computer) &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;. You can compare the two if you are interested. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://cs.clark.edu/~mjohn0882/CSE121/src/Assignment.4/Project.3/calc&quot; class=&quot;bb-url&quot;&gt;The bad one&lt;/a&gt; : &lt;a href=&quot;http://cs.clark.edu/~mjohn0882/CSE121/src/Assignment.4/Project.3/bug_be_gone&quot; class=&quot;bb-url&quot;&gt;The good one&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Basically, I added another var that held the original value of init_res, and after the inner most loop finished, it would reset init_res.&lt;/p&gt;
 </description>
     <pubDate>Sat, 10 Feb 2007 04:28:10 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1214844 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
