Advertisement
Guest User

Untitled

a guest
May 16th, 2018
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. <?php
  2. $n = readline();
  3. echo str_repeat('*', $n) . PHP_EOL;
  4. for ($i = 0; $i < $n - 2; $i++) {
  5.     echo str_repeat("*", 1);
  6.     echo str_repeat(" ", $n - 2);
  7.     echo str_repeat("*", 1). PHP_EOL;
  8. }
  9. echo str_repeat('*', $n);
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement