php program to print alphabet pattern C
PHP program to print alphabet pattern C
PHP program to print alphabet pattern C
Example :-
<?phpecho "<pre>";for ($row = 0; $row < 11; $row++) { for ($col = 0; $col <= 11; $col++) { if (($col == 1 and ($row != 0 and $row != 10)) or (($row == 0 or $row == 10) and ($col > 1 and $col < 9)) or ($col == 9 and ($row == 1 or $row == 9))) { echo "C"; } else { echo " "; } } echo "<br>";}echo "</pre>";?>PHP program to print alphabet pattern C
<?php
echo "<pre>";
for ($row = 0; $row < 11; $row++) {
for ($col = 0; $col <= 11; $col++) {
if (($col == 1 and ($row != 0 and
$row != 10))
or (($row == 0 or $row == 10) and ($col >
1 and $col < 9))
or ($col == 9 and ($row == 1 or
$row == 9))) {
echo "C";
} else {
echo " ";
}
}
echo "<br>";
}
echo "</pre>";
?>
Post a Comment