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