Tuesday, 6 April 2021

2 4 8 32 256 ...n series in php

2 4 8 32 256 ...n series in php


<title>1,2,2,4,8,32,256.....n</title>
<?php
/* 1,2,2,4,8,32,256.....n */
$a=1;
$b=2;
$c=0;
$l=0;
while($l<=5)
{
$c=$a*$b;
print"<br>".$c;
$a=$b;
$b=$c;
$l++;
}
?>


OUTPUT:  2 4 8 32 256

1 comment:

  1. If you really want to clear your IAS UPSC Exams then you should take admission in the best ias upsc coaching in India to chase your dream job and life.

    ReplyDelete