PHP Program to print Alphabet Pattern B
PHP Program to print Alphabet Pattern B
Example :-
<?phpecho "<pre>";for($row=0;$row<11;$row++){ for($col=0;$col<=11;$col++) { if ($col ==1 OR (($row==0 or $row==5 or $row==10)AND $col>1 AND $col<9)OR ($col==9 AND $row !=0 AND $row<11) ) { echo"B"; } else { echo " "; } } echo "<br>"; } echo "</pre>";?>PHP Program to print Alphabet Pattern B
<?php
echo "<pre>";
for($row=0;$row<11;$row++){
for($col=0;$col<=11;$col++)
{
if ($col ==1 OR (($row==0 or $row==5
or $row==10)AND $col>1
AND $col<9)OR ($col==9 AND $row !=0
AND $row<11) )
{
echo"B";
}
else {
echo " ";
}
}
echo "<br>";
}
echo "</pre>";
?>
Post a Comment