<?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 on: Simple factorial function</title>
	<atom:link href="http://seich.martianwabbit.com/simple-factorial-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://seich.martianwabbit.com/simple-factorial-function/</link>
	<description>Legendarido...</description>
	<lastBuildDate>Thu, 24 Jun 2010 18:32:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Seich</title>
		<link>http://seich.martianwabbit.com/simple-factorial-function/comment-page-1/#comment-966</link>
		<dc:creator>Seich</dc:creator>
		<pubDate>Fri, 09 Oct 2009 20:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=111#comment-966</guid>
		<description>something like this would get the information from a form and then have it echo the factorial.
&lt;em&gt;process.php&lt;/em&gt;
[cc lang=&quot;php&quot;]
&lt;?php

$f = $_POST[&#039;factorial&#039;];

echo(factorial($f));

function factorial($input){
  $output = 1;
  for($x = $input; $x &gt;= 1; $x--){
    $output *= $x;
  }
  return($output);
}

?&gt;
[/cc]

I hope that fulfills your request.</description>
		<content:encoded><![CDATA[<p>something like this would get the information from a form and then have it echo the factorial.<br />
<em>process.php</em></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #000088;">$f</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'factorial'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span>factorial<span style="color: #009900;">&#40;</span><span style="color: #000088;">$f</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> factorial<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$input</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$x</span><span style="color: #339933;">--</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$output</span> <span style="color: #339933;">*=</span> <span style="color: #000088;">$x</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>I hope that fulfills your request.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mutsil</title>
		<link>http://seich.martianwabbit.com/simple-factorial-function/comment-page-1/#comment-965</link>
		<dc:creator>Mutsil</dc:creator>
		<pubDate>Fri, 09 Oct 2009 11:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=111#comment-965</guid>
		<description>can you explain it with the help of getting input with a form by post method..






Here can u please give me a page &quot;process.php&quot; with a code getting input.</description>
		<content:encoded><![CDATA[<p>can you explain it with the help of getting input with a form by post method..</p>
<p>Here can u please give me a page &#8220;process.php&#8221; with a code getting input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seich</title>
		<link>http://seich.martianwabbit.com/simple-factorial-function/comment-page-1/#comment-964</link>
		<dc:creator>Seich</dc:creator>
		<pubDate>Thu, 08 Oct 2009 21:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=111#comment-964</guid>
		<description>what do you mean?</description>
		<content:encoded><![CDATA[<p>what do you mean?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mutsil</title>
		<link>http://seich.martianwabbit.com/simple-factorial-function/comment-page-1/#comment-963</link>
		<dc:creator>mutsil</dc:creator>
		<pubDate>Thu, 08 Oct 2009 12:07:36 +0000</pubDate>
		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=111#comment-963</guid>
		<description>how to get input for the same function.</description>
		<content:encoded><![CDATA[<p>how to get input for the same function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seich</title>
		<link>http://seich.martianwabbit.com/simple-factorial-function/comment-page-1/#comment-930</link>
		<dc:creator>Seich</dc:creator>
		<pubDate>Sat, 08 Aug 2009 19:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=111#comment-930</guid>
		<description>My sister was required to use a for loop ^^ plus idk what labview&#039;s capabilities are so, I kept it as basic as possible. I like your function nevertheless, it is short and simple.</description>
		<content:encoded><![CDATA[<p>My sister was required to use a for loop ^^ plus idk what labview&#8217;s capabilities are so, I kept it as basic as possible. I like your function nevertheless, it is short and simple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Cooper</title>
		<link>http://seich.martianwabbit.com/simple-factorial-function/comment-page-1/#comment-929</link>
		<dc:creator>Tim Cooper</dc:creator>
		<pubDate>Sat, 08 Aug 2009 19:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=111#comment-929</guid>
		<description>function factorial($n){
    return $n == 1 ? 1:$n * factorial($n - 1);
}</description>
		<content:encoded><![CDATA[<p>function factorial($n){<br />
    return $n == 1 ? 1:$n * factorial($n &#8211; 1);<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
