Sunday, 14 June 2015

Diamond Shape IN VB Script

 <script language="vbscript">
for i=0 to 5
for j=i to 5
document.write("_")
next
for k=1 to ((i*2)+1)
document.write("*")
next
document.write("<br>")
next
for x=5 to 0 step-1
for y=x to 5
document.write("_")
next
for z=1 to ((x*2)+1)
document.write("*")
next
document.write("<br>")
next
</script>

Instructions :-
  1. Copy this code and paste it in notepad
  2. Save it with an extension .html
  3. Run it on Internet Explorer only.It might not work on other browser as they do not support vb language.

No comments:

Post a Comment