Write VB Script for printing the below pattern

5 4 3 2 1
5 4 3 2 
5 4 3 
5 4
5

Ans:
For i=1 to 5

    For k=i to 5
       Var =  k & " " & Var 
    Next

    For j=2 to i
       Var = Var & " "
    Next

    Var1 = Var1& Vbnewline &var
    Var = ""
Next

msgbox Var1

Subscribe to TestingQ.Net

To receive daily posted Interview Questions
Just enter your email address below and click 'Subscribe'

Enter your email address: