Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $num = intval(readline());
- echo '/' . str_repeat("^", $num / 2) . '\\' . str_repeat('_', (2 * $num - 4 - 2 * floor($num / 2))) . '/' . str_repeat("^", $num / 2) . '\\' . "\n";
- for ($i = 0; $i < $num - 3; $i++) {
- echo '|' . str_repeat(' ', $num * 2 - 2) . '|' . "\n";
- }
- echo '|' . str_repeat(" ", $num / 2) . ' ' . str_repeat('_', (2 * $num - 4 - 2 * floor($num / 2))) . ' ' . str_repeat(" ", $num / 2) . '|' . "\n";
- echo "\\" . str_repeat("_", $num / 2) . '/' . str_repeat(' ', (2 * $num - 4 - 2 * floor($num / 2))) . "\\" . str_repeat("_", $num / 2) . '/' . "\n";
Advertisement
Add Comment
Please, Sign In to add comment