<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[struct.c]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Tue, 06 Nov 2007 09:31:50 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	* Demonstrates structures that contain other structures. */<br/>/* Receives input for corner coordinates of a rectangle and<br/> &nbsp; calculates the area. Assumes that the y coordinate of the<br/> &nbsp; lower-right corner is greater than the y coordinate of the<br/> &nbsp; upper-left corner, that the x coordinate of the lower-<br/> &nbsp; right corner is greater than the x coordinate of the upper-<br/> &nbsp; left corner, and that all coordinates are positive. */<br/>#include &lt;stdio.h&gt;<br/>int length, width;<br/>long area;<br/>struct coord{<br/> &nbsp; &nbsp;int x;<br/> &nbsp; &nbsp;int y;<br/>};<br/>struct rectangle{<br/> &nbsp; &nbsp;struct coord topleft;<br/> &nbsp; &nbsp;struct coord bottomrt;<br/>} mybox;<br/>int main( void )<br/>{<br/> &nbsp; &nbsp;/* Input the coordinates */<br/> &nbsp; &nbsp;printf(&quot;&#92;nEnter the top left x coordinate: &quot;);<br/> &nbsp; &nbsp;scanf(&quot;%d&quot;, &amp;mybox.topleft.x);<br/> &nbsp; &nbsp;printf(&quot;&#92;nEnter the top left y coordinate: &quot;);<br/> &nbsp; &nbsp;scanf(&quot;%d&quot;, &amp;mybox.topleft.y);<br/> &nbsp; &nbsp;printf(&quot;&#92;nEnter the bottom right x coordinate: &quot;);<br/> &nbsp; &nbsp;scanf(&quot;%d&quot;, &amp;mybox.bottomrt.x);<br/> &nbsp; &nbsp;printf(&quot;&#92;nEnter the bottom right y coordinate: &quot;);<br/> &nbsp; &nbsp;scanf(&quot;%d&quot;, &amp;mybox.bottomrt.y);<br/> &nbsp; &nbsp;/* Calculate the length and width */<br/> &nbsp; &nbsp;width = mybox.bottomrt.x - mybox.topleft.x;<br/> &nbsp; &nbsp;length = mybox.bottomrt.y - mybox.topleft.y;<br/> &nbsp; &nbsp;/* Calculate and display the area */<br/> &nbsp; &nbsp;area = width * length;<br/> &nbsp; &nbsp;printf(&quot;&#92;nThe area is %ld units.&#92;n&quot;, area);<br/> &nbsp; &nbsp;return 0;<br/>}<br/>
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] struct.c]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>