QTP Tips and Tricks - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: General (https://www.learnqtp.com/forums/Forum-General) +--- Forum: Suggestions and Feedback (https://www.learnqtp.com/forums/Forum-Suggestions-and-Feedback) +--- Thread: QTP Tips and Tricks (/Thread-QTP-Tips-and-Tricks) |
RE: VBScript to print a pattern - ashitroy1991 - 08-24-2017 (07-27-2011, 04:05 PM)rajpes Wrote: Just a puzzle here,You need print the pattern like below depending on no. of rows x = inputbox("enter no. of rows") For i = 1 To x y = x-i For j = 1 To y str = str & "*" Next If i = 1 Then str = str & i Else For k = i To 1 step -1 str = str & k Next For k = 2 To i str = str & k Next End If For j = 1 To y str = str & "*" Next print str str = "" Next |