Friday, November 19, 2010

VBScript Code - Making inverse triangle

Write the below code in a notepad and save it as a .vbs file. Either run it from command prompt or run it by double-clicking on it.

VBScript Code - Making inverse triangle

****
***
**
*

x=""
K=0
For i=4 to 1 step -1
  x=x & space(k) & (String(i,"*")) & vblf
  k=k+1
Next
msgbox x