var n; do { write("Enter number of lines: "); n = read(); } while (n<=0 || isNaN(n)); if (n%2 == 0) { n++; } for (var i=1; i<=n; i++) { if (i<n/2) { for (var k=1; k<=(n/2)-i+1; k++) { write(" "); } for (var j=1; j<=(i*2)-1; j++) { write("*"); } } else { for (var k=1; k<i-(n/2); k++) { write(" "); } for (var j=1; j<=(n*2)-(i*2)+1; j++) { write("*"); } } write("\n"); }
(
)
{
}
[
]
"
;
=
+
-
*
!
/
%
&
|