<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
body{
font-size: 24px;
line-height: 24px;
text-align: center;
padding: 0;
margin: 0;
}
b{
width: 12px;
display: inline-block;
}
</style>
</head>
<body>
<script>
function fn(a){
var str = "";
for (var i=0; i<a; i++) {
for (var j=0; j<a; j++)
str += (i==0||i==a-1||j==i||j+i==a-1||j==0||j==a-1)?"<b>#</b>":"<b> </b>";
str += "<br>";
}
document.write(str);
}
fn(18);
</script>
</body>
</html>