Posts

Bigg Boss Halla Bol - Weekend Ka Halla Bol - 25th January 2015 - Full Episode

Image

Bigg Boss Halla Bol - Weekend Ka Halla Bol - 24th January 2015 - Full Episode (HD)

Bigg Boss Halla Bol - Tabaadla - 23rd January 2015 - Full Episode (HD)

Bigg Boss Halla Bol - Mid Week Elimination - 22nd January 2015 - Full Episode (HD)

Bigg Boss Halla Bol - 21st January 2015 - Full Episode (HD)

Get Factorial of a Number using jQuery

Image
In mathematics, the  factorial  of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, The value of 0! is 1, according to the convention for an empty product. Read full about  factorial    here  on  wikipedia. We will use For loop for getting  factorial   of  a number, so we just have to decrease value by one and multiply with previous holding temporary value, We have to initiate temporary value with 1. The Following will be code: <input type="text" name="factroial4" id="factroial4" /> <br/> <button type="button" name="button" onclick="GetFactorial();" /> Calculate Factorial </button> <br/> <div id="showresulthere"></div> <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script>  // function defination  function GetFactorial()    {

Get Factorial of a Number using PHP

Image
In mathematics, the  factorial  of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, The value of 0! is 1, according to the convention for an empty product. Read full about  factorial    here  on  wikipedia. We will use For loop for getting  factorial   of  a number, so we just have to decrease value by one and multiply with previous holding temporary value, We have to initiate temporary value with 1. The Following will be code: Function oriented way: <?php // function defination function GetFactorial($value) { $tempvalue = 1;  for ( $i=$value ; $i>0 ;  $i-- ) {   $tempvalue *=  $i ; // this is same as the   $tempvalue =  $tempvalue * $i ; } return $tempvalue; } // function defination // getting value by calling echo "<br/>Factorial of 1 is : ".GetFactorial(3); echo "<br/>Factorial of 2 is : ".GetFactorial(3); echo