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