<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Break the Style &#187; Programming Corner</title>
	<atom:link href="http://www.shahporan.com/post-item/category/programming-corner/feed" rel="self" type="application/rss+xml" />
	<link>http://www.shahporan.com</link>
	<description>Lets develop web based world</description>
	<lastBuildDate>Mon, 04 Jul 2011 10:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Finding Robotic Path and Distance</title>
		<link>http://www.shahporan.com/post-item/75.html</link>
		<comments>http://www.shahporan.com/post-item/75.html#comments</comments>
		<pubDate>Wed, 24 Mar 2010 17:28:28 +0000</pubDate>
		<dc:creator>Paran</dc:creator>
				<category><![CDATA[Programming Corner]]></category>
		<category><![CDATA[Finding Robotic Path and Distance]]></category>

		<guid isPermaLink="false">http://www.shahporan.com/?p=75</guid>
		<description><![CDATA[#include&#60;iostream.h&#62; #include&#60;conio.h&#62; #include&#60;math.h&#62; void main() { clrscr(); int x,x1,y,y1,i=0; x=x1=35; y=y1=12; cout&#60;&#60;”\t Starting point ( 35,12 ).\n\t Starting point is notified by * “; char *comm; cout&#60;&#60;”\n\tGive your command:”; cin&#62;&#62;comm; gotoxy(x,y); cout&#60;&#60;”*”; while(comm[i]!=’ ‘) { if(comm[i]==’n&#8217;) { y–; gotoxy(x,y); cout&#60;&#60;”n”; } if(comm[i]==’s’) { x++; gotoxy(x,y); cout&#60;&#60;”s”; } if(comm[i]==’e&#8217;) { y++; gotoxy(x,y); cout&#60;&#60;”e”; } if(comm[i]==’w&#8217;) { [...]]]></description>
			<content:encoded><![CDATA[<p>#include&lt;iostream.h&gt;</p>
<p>#include&lt;conio.h&gt;</p>
<p>#include&lt;math.h&gt;</p>
<p>void main()</p>
<p>{ clrscr();</p>
<p>int x,x1,y,y1,i=0;</p>
<p>x=x1=35; y=y1=12;</p>
<p>cout&lt;&lt;”\t Starting point ( 35,12 ).\n\t Starting point is notified by * “;<span id="more-75"></span></p>
<p>char *comm;</p>
<p>cout&lt;&lt;”\n\tGive your command:”;</p>
<p>cin&gt;&gt;comm;</p>
<p>gotoxy(x,y);</p>
<p>cout&lt;&lt;”*”;</p>
<p>while(comm[i]!=’ ‘)</p>
<p>{ if(comm[i]==’n&#8217;)</p>
<p>{ y–;</p>
<p>gotoxy(x,y);</p>
<p>cout&lt;&lt;”n”;</p>
<p>}</p>
<p>if(comm[i]==’s’)</p>
<p>{ x++;</p>
<p>gotoxy(x,y);</p>
<p>cout&lt;&lt;”s”;</p>
<p>}</p>
<p>if(comm[i]==’e&#8217;)</p>
<p>{ y++;</p>
<p>gotoxy(x,y);</p>
<p>cout&lt;&lt;”e”;</p>
<p>}</p>
<p>if(comm[i]==’w&#8217;)</p>
<p>{ x–;</p>
<p>gotoxy(x,y);</p>
<p>cout&lt;&lt;”w”;</p>
<p>}</p>
<p>i++;</p>
<p>}</p>
<p>cout&lt;&lt;”\n\tEnd point ( “&lt;&lt;x&lt;&lt;” , “&lt;&lt;y&lt;&lt;” )”;</p>
<p>float dist=sqrt((x-x1)*(x-x1)+(y-y1)*(y-y1));</p>
<p>gotoxy(9,16);</p>
<p>cout&lt;&lt;”Total distance : “&lt;&lt;dist;</p>
<p>getch();</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shahporan.com/post-item/75.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Random Number</title>
		<link>http://www.shahporan.com/post-item/73.html</link>
		<comments>http://www.shahporan.com/post-item/73.html#comments</comments>
		<pubDate>Wed, 24 Mar 2010 17:05:28 +0000</pubDate>
		<dc:creator>Paran</dc:creator>
				<category><![CDATA[Programming Corner]]></category>
		<category><![CDATA[program random]]></category>
		<category><![CDATA[random number]]></category>

		<guid isPermaLink="false">http://www.shahporan.com/?p=73</guid>
		<description><![CDATA[#include&#60;iostream.h&#62; #include&#60;conio.h&#62; #include&#60;math.h&#62; void main() { clrscr(); int x0,k,a,m,i,j,random[20],r; cout&#60;&#60;”Enter your x0 value = “; cin&#62;&#62;x0; cout&#60;&#60;endl&#60;&#60;”Enter your K value: = “; cin&#62;&#62;k; cout&#60;&#60;endl&#60;&#60;”Enter the value of r&#62;2: = “; cin&#62;&#62;r; m=pow(2,r); a=k*8+3; for(i=0;i&#60;10;i++) { random[i]=(x0*a)%m; x0=random[i]; } cout&#60;&#60;”Random numbers are:”&#60;&#60;endl; for(j=0;j&#60;i;j++) cout&#60;&#60;random[j]&#60;&#60;endl; getch(); }]]></description>
			<content:encoded><![CDATA[<p>#include&lt;iostream.h&gt;<br />
#include&lt;conio.h&gt;<br />
#include&lt;math.h&gt;<br />
void main()<br />
{<br />
clrscr();<br />
int x0,k,a,m,i,j,random[20],r;<br />
cout&lt;&lt;”Enter your x0 value = “;<br />
cin&gt;&gt;x0;<span id="more-73"></span><br />
cout&lt;&lt;endl&lt;&lt;”Enter your K value: = “;<br />
cin&gt;&gt;k;<br />
cout&lt;&lt;endl&lt;&lt;”Enter the value of r&gt;2: = “;<br />
cin&gt;&gt;r;<br />
m=pow(2,r);<br />
a=k*8+3;<br />
for(i=0;i&lt;10;i++)<br />
{<br />
random[i]=(x0*a)%m;<br />
x0=random[i];<br />
}<br />
cout&lt;&lt;”Random numbers are:”&lt;&lt;endl;<br />
for(j=0;j&lt;i;j++)<br />
cout&lt;&lt;random[j]&lt;&lt;endl;<br />
getch();<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shahporan.com/post-item/73.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chemical Reaction</title>
		<link>http://www.shahporan.com/post-item/71.html</link>
		<comments>http://www.shahporan.com/post-item/71.html#comments</comments>
		<pubDate>Wed, 24 Mar 2010 16:58:54 +0000</pubDate>
		<dc:creator>Paran</dc:creator>
				<category><![CDATA[Programming Corner]]></category>
		<category><![CDATA[chemical]]></category>
		<category><![CDATA[chemical reaction]]></category>
		<category><![CDATA[program chemical]]></category>
		<category><![CDATA[program reaction]]></category>
		<category><![CDATA[reaction]]></category>

		<guid isPermaLink="false">http://www.shahporan.com/?p=71</guid>
		<description><![CDATA[#include&#60;iostream.h&#62; #include&#60;conio.h&#62; void main() {  clrscr(); float A[52], B[52], C[52], k1= 0.008, k2= 0.002, del= 0.1, time= 0.0; A[0]= 100.0; B[0]= 50.0; C[0]= 0.0; cout&#60;&#60;&#8221;\tTime\tA][i]\t\tB[i]\t\tC[i]\n\n&#8221;; for( int i=0; i&#60;51; i++ ){ cout&#60;&#60;&#8221;\t&#8221;&#60;&#60; time&#60;&#60;&#8221;\t&#8221;&#60;&#60; A[i]&#60;&#60;&#8221;\t\t&#8221;&#60;&#60; B[i]&#60;&#60;&#8221;\t\t&#8221;&#60;&#60; C[i]&#60;&#60;&#8221;\n&#8221;; A[i+1] = A[i] + ( k2 * C[i] &#8211; k1*A[i]*B[i] ) * del; B[i+1] = B[i] + ( k2 [...]]]></description>
			<content:encoded><![CDATA[<p>#include&lt;iostream.h&gt;</p>
<p>#include&lt;conio.h&gt;</p>
<p>void main()</p>
<p>{  clrscr();</p>
<p>float A[52], B[52], C[52], k1= 0.008, k2= 0.002, del= 0.1, time= 0.0;</p>
<p>A[0]= 100.0; B[0]= 50.0; C[0]= 0.0;</p>
<p>cout&lt;&lt;&#8221;\tTime\tA][i]\t\tB[i]\t\tC[i]\n\n&#8221;;<span id="more-71"></span></p>
<p>for( int i=0; i&lt;51; i++ ){</p>
<p>cout&lt;&lt;&#8221;\t&#8221;&lt;&lt; time&lt;&lt;&#8221;\t&#8221;&lt;&lt; A[i]&lt;&lt;&#8221;\t\t&#8221;&lt;&lt; B[i]&lt;&lt;&#8221;\t\t&#8221;&lt;&lt; C[i]&lt;&lt;&#8221;\n&#8221;;</p>
<p>A[i+1] = A[i] + ( k2 * C[i] &#8211; k1*A[i]*B[i] ) * del;</p>
<p>B[i+1] = B[i] + ( k2 * C[i] &#8211; k1*A[i]*B[i] ) * del;</p>
<p>C[i+1] = C[i] + 2 * ( k1 * A[i] * B[i] &#8211; k2 * C[i] ) * del;</p>
<p>time = time + del;</p>
<p>}</p>
<p>getch();</p>
<p>}</p>
<p>Please share your better concept about this program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shahporan.com/post-item/71.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detect bomber fighter path</title>
		<link>http://www.shahporan.com/post-item/68.html</link>
		<comments>http://www.shahporan.com/post-item/68.html#comments</comments>
		<pubDate>Wed, 24 Mar 2010 16:49:54 +0000</pubDate>
		<dc:creator>Paran</dc:creator>
				<category><![CDATA[Programming Corner]]></category>
		<category><![CDATA[bomber]]></category>
		<category><![CDATA[bomber fighter]]></category>
		<category><![CDATA[fighter]]></category>
		<category><![CDATA[program bomber]]></category>

		<guid isPermaLink="false">http://www.shahporan.com/?p=68</guid>
		<description><![CDATA[#include&#60;iostream.h&#62; #include&#60;conio.h&#62; #include&#60;math.h&#62; #include&#60;stdlib.h&#62; void main(){ clrscr(); int xb[13]={80,90,99,108,116,125,133,141,151,160,169,179,180} ; int yb[13]={0,-2,-5,-9,-15,-18,-23,-29,-28,-25,-21,-20,-17} ; float xf[13], yf[13], vf= 20.0, sin, cos, time, distance, dist_range=10 ; xf[0]= 0.0;  yf[0]= 50.0 ; for( int i=0; i&#60;13; i++){ distance = sqrt( ( yb[i]-yf[i] ) * ( yb[i]-yf[i] ) + ( xb[i]-xf[i] ) * ( xb[i]-xf[i] ) ) ; gotoxy( [...]]]></description>
			<content:encoded><![CDATA[<p>#include&lt;iostream.h&gt;<br />
#include&lt;conio.h&gt;<br />
#include&lt;math.h&gt;<br />
#include&lt;stdlib.h&gt;</p>
<p>void main(){<br />
clrscr();<br />
int xb[13]={80,90,99,108,116,125,133,141,151,160,169,179,180} ;<br />
int yb[13]={0,-2,-5,-9,-15,-18,-23,-29,-28,-25,-21,-20,-17} ;<br />
float xf[13], yf[13], vf= 20.0, sin, cos, time, distance, dist_range=10 ;<span id="more-68"></span></p>
<p>xf[0]= 0.0;  yf[0]= 50.0 ;<br />
for( int i=0; i&lt;13; i++){<br />
distance = sqrt( ( yb[i]-yf[i] ) * ( yb[i]-yf[i] ) + ( xb[i]-xf[i] ) * ( xb[i]-xf[i] ) ) ;<br />
gotoxy( xf[i],yf[i]);<br />
cout&lt;&lt;&#8221;b&#8221;&lt;&lt;i;<br />
gotoxy( xb[i],yb[i]);<br />
cout&lt;&lt;&#8221;f&#8221;&lt;&lt;i;<br />
if( distance &lt;= dist_range ){<br />
cout&lt;&lt;&#8221;\n\tdistance : &#8220;&lt;&lt;distance ;<br />
getch() ;<br />
exit(0) ;<br />
}<br />
else if{<br />
if( time &gt; 12 ){<br />
cout&lt;&lt;&#8221;\n\tTarget escepted.&#8221; ;<br />
getch() ;<br />
exit(0) ;<br />
}<br />
else{<br />
sin = ( yb[i] &#8211; yf[i] )/ distance ;<br />
cos = ( xb[i] &#8211; xf[i] )/ distance ;<br />
xf[i+1] = xf[i] + vf * cos ;<br />
yf[i+1] = yf[i] + vf * sin ;<br />
}<br />
}<br />
}<br />
getch();<br />
}</p>
<p>Please share your better concept about this program.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shahporan.com/post-item/68.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
