<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Lettergram</title>
	<atom:link href="http://lettergram.org/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://lettergram.org</link>
	<description>Imagining is the hard part.</description>
	<lastBuildDate>Sat, 24 Mar 2012 05:06:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on I am Man by Lettergram</title>
		<link>http://lettergram.org/to-the-living/#comment-219</link>
		<dc:creator>Lettergram</dc:creator>
		<pubDate>Sat, 24 Mar 2012 05:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=351#comment-219</guid>
		<description>Hoping this one finally wins me a competition, I doubt it, but hey the last one that beat me in a competition didn&#039;t even rhyme... so who knows!</description>
		<content:encoded><![CDATA[<p>Hoping this one finally wins me a competition, I doubt it, but hey the last one that beat me in a competition didn&#8217;t even rhyme&#8230; so who knows!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on I am Man by Zach</title>
		<link>http://lettergram.org/to-the-living/#comment-217</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Thu, 22 Mar 2012 17:56:39 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=351#comment-217</guid>
		<description>nice!</description>
		<content:encoded><![CDATA[<p>nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Zach</title>
		<link>http://lettergram.org/338/#comment-211</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Wed, 07 Mar 2012 03:14:27 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-211</guid>
		<description>Same here. The more we point out each other&#039;s tiny mistakes the more precise we can become.</description>
		<content:encoded><![CDATA[<p>Same here. The more we point out each other&#8217;s tiny mistakes the more precise we can become.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Lettergram</title>
		<link>http://lettergram.org/338/#comment-210</link>
		<dc:creator>Lettergram</dc:creator>
		<pubDate>Wed, 07 Mar 2012 01:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-210</guid>
		<description>I edited it to read what I stated because there was a possibility of receiving an error with some compilers. Which thank you for pointing out, I NEED TO BECOME BETTER!</description>
		<content:encoded><![CDATA[<p>I edited it to read what I stated because there was a possibility of receiving an error with some compilers. Which thank you for pointing out, I NEED TO BECOME BETTER!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Zach</title>
		<link>http://lettergram.org/338/#comment-209</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Wed, 07 Mar 2012 01:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-209</guid>
		<description>#include 

int main() {
     int kwh, cust, i;
     kwh = cust = -1;


     if ((kwh &amp;&amp; cust) != -1)
          printf(&quot;golly, zach&#039;s pretentious explanation is accurate.\n&quot;);
     else
          printf(&quot;zach is retarded. QED.\n&quot;);
}

How I was interpreting it originally.</description>
		<content:encoded><![CDATA[<p>#include </p>
<p>int main() {<br />
     int kwh, cust, i;<br />
     kwh = cust = -1;</p>
<p>     if ((kwh &amp;&amp; cust) != -1)<br />
          printf(&#8220;golly, zach&#8217;s pretentious explanation is accurate.\n&#8221;);<br />
     else<br />
          printf(&#8220;zach is retarded. QED.\n&#8221;);<br />
}</p>
<p>How I was interpreting it originally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Zach</title>
		<link>http://lettergram.org/338/#comment-208</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Wed, 07 Mar 2012 01:38:54 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-208</guid>
		<description>Aha! I just realized something. In the original statement:

while(kwh &amp;&amp; cust != -1)

The &#039;!=&#039; takes precedence over the &amp;&amp;. So if the user did enter -1 -1, it would compare -1 &amp;&amp; (-1 != -1), ultimately failing the test; breaking out of the loop. I totally overlooked this.</description>
		<content:encoded><![CDATA[<p>Aha! I just realized something. In the original statement:</p>
<p>while(kwh &amp;&amp; cust != -1)</p>
<p>The &#8216;!=&#8217; takes precedence over the &amp;&amp;. So if the user did enter -1 -1, it would compare -1 &amp;&amp; (-1 != -1), ultimately failing the test; breaking out of the loop. I totally overlooked this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Zach</title>
		<link>http://lettergram.org/338/#comment-207</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Wed, 07 Mar 2012 01:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-207</guid>
		<description>You&#039;re right Robb, but you&#039;re also a dick. Responding pretentiously to something pretentious leaves us no where. I wasn&#039;t trying to be. Although I could have left the QED out, I was just trying to be helpful.</description>
		<content:encoded><![CDATA[<p>You&#8217;re right Robb, but you&#8217;re also a dick. Responding pretentiously to something pretentious leaves us no where. I wasn&#8217;t trying to be. Although I could have left the QED out, I was just trying to be helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by robb</title>
		<link>http://lettergram.org/338/#comment-206</link>
		<dc:creator>robb</dc:creator>
		<pubDate>Wed, 07 Mar 2012 00:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-206</guid>
		<description>https://gist.github.com/1990107</description>
		<content:encoded><![CDATA[<p><a href="https://gist.github.com/1990107" rel="nofollow">https://gist.github.com/1990107</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Lettergram</title>
		<link>http://lettergram.org/338/#comment-205</link>
		<dc:creator>Lettergram</dc:creator>
		<pubDate>Wed, 07 Mar 2012 00:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-205</guid>
		<description>I agree with what you are saying for the most part, however, in the requirements (which you can&#039;t see because I didn&#039;t copy them...) it was a requisite to have to type &gt;&gt; -1 -1 to end the program (WHY? I have no idea). However, with the program I have above is ran, if you type -1 -1 it will end the program, granted it should probably read:

while(kwh != -1 &amp;&amp; cust != -1){

instead of what I have entered.</description>
		<content:encoded><![CDATA[<p>I agree with what you are saying for the most part, however, in the requirements (which you can&#8217;t see because I didn&#8217;t copy them&#8230;) it was a requisite to have to type >> -1 -1 to end the program (WHY? I have no idea). However, with the program I have above is ran, if you type -1 -1 it will end the program, granted it should probably read:</p>
<p>while(kwh != -1 &#038;&#038; cust != -1){</p>
<p>instead of what I have entered.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Programming Problem by Zach</title>
		<link>http://lettergram.org/338/#comment-204</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Tue, 06 Mar 2012 23:43:02 +0000</pubDate>
		<guid isPermaLink="false">http://lettergram.org/?p=338#comment-204</guid>
		<description>Just for cleaning purposes, check your main method. It requires the user to enter -1 followed by -1 (instead of what was probably assumed: entering a single -1). An alternate main method could be:

int main(void){
/* Input Values */
int kwh; /* kilowatt-hours per customer */
int cust; /* customer number */
char STOP[2] = &quot;&quot;;
while(1){
	printf(&quot;Enter customer number and KWH: &quot;);
	scanf(&quot;%d %d&quot;, &amp;cust, &amp;kwh);
	charge_calc_kwh(&amp;kwh, &amp;cust);
	totaling(&amp;kwh, &amp;cost);
	printf(&quot;Would you like to enter another data entry?(&#039;n&#039; or &#039;y&#039;) &quot;);
	scanf(&quot;%s&quot;, &amp;STOP[0]);
	if (STOP[0] == &#039;n&#039;){
		break;}
}

More verbose, but it seems to make more sense. Your check:

&quot;&quot;&quot; while(kwh &amp;&amp; cust != -1){ &quot;&quot;&quot;

could never happen; this is because if the user did want to end the program and typed:

&gt;&gt;&gt; -1 -1

(-1 &amp;&amp; -1) would result in a 1 (or a 0 if one of their entries was &#039;0&#039;), and never a -1 like in your check. The &#039;&amp;&amp;&#039; is a logical AND, and interprets the entries as either a 0 or a 1.

QED</description>
		<content:encoded><![CDATA[<p>Just for cleaning purposes, check your main method. It requires the user to enter -1 followed by -1 (instead of what was probably assumed: entering a single -1). An alternate main method could be:</p>
<p>int main(void){<br />
/* Input Values */<br />
int kwh; /* kilowatt-hours per customer */<br />
int cust; /* customer number */<br />
char STOP[2] = &#8220;&#8221;;<br />
while(1){<br />
	printf(&#8220;Enter customer number and KWH: &#8220;);<br />
	scanf(&#8220;%d %d&#8221;, &amp;cust, &amp;kwh);<br />
	charge_calc_kwh(&amp;kwh, &amp;cust);<br />
	totaling(&amp;kwh, &amp;cost);<br />
	printf(&#8220;Would you like to enter another data entry?(&#8216;n&#8217; or &#8216;y&#8217;) &#8220;);<br />
	scanf(&#8220;%s&#8221;, &amp;STOP[0]);<br />
	if (STOP[0] == &#8216;n&#8217;){<br />
		break;}<br />
}</p>
<p>More verbose, but it seems to make more sense. Your check:</p>
<p>&#8220;&#8221;" while(kwh &amp;&amp; cust != -1){ &#8220;&#8221;"</p>
<p>could never happen; this is because if the user did want to end the program and typed:</p>
<p>&gt;&gt;&gt; -1 -1</p>
<p>(-1 &amp;&amp; -1) would result in a 1 (or a 0 if one of their entries was &#8217;0&#8242;), and never a -1 like in your check. The &#8216;&amp;&amp;&#8217; is a logical AND, and interprets the entries as either a 0 or a 1.</p>
<p>QED</p>
]]></content:encoded>
	</item>
</channel>
</rss>

