write a vb script to generate the following pattern

*****
****
***
**
*

Answers were Sorted based on User's Feedback



write a vb script to generate the following pattern ***** **** *** ** *..

Answer / mudaseer

for i=5 to 1 step -1
for j=i to 1 step -1
vstr=vstr & "*" & " "
next


vstr=vstr & vbnewline
next
msgbox vstr

Is This Answer Correct ?    30 Yes 6 No

write a vb script to generate the following pattern ***** **** *** ** *..

Answer / prathyusha

For i=5 To 1 Step-1
For j=1 To i
v=v&"*"
Next
n=n&vbCrLf&v
v=""
next
MsgBox n

Is This Answer Correct ?    7 Yes 0 No

write a vb script to generate the following pattern ***** **** *** ** *..

Answer / miko

Dim x,i,j

For i=1 To 5
For j=1 To i
x=x&j
Next
x=x&vbNewLine
next
MsgBox x

***********output*********

1
12
123
1234
12345

Is This Answer Correct ?    7 Yes 3 No

write a vb script to generate the following pattern ***** **** *** ** *..

Answer / sumathi

For i=5 to 1 step -1
var=string(i,"*")
print var
Next

Is This Answer Correct ?    14 Yes 11 No

write a vb script to generate the following pattern ***** **** *** ** *..

Answer / eswar

x = "*"
For i=5 to 1 step -1
For j=1 to i
y = y&x
Next
y=y&" "
Next
MsgBox y

Is This Answer Correct ?    6 Yes 4 No

write a vb script to generate the following pattern ***** **** *** ** *..

Answer / sanju

ioutput=""
inum=inputbox("enter number")
For indx1 = inum To 1 step-1
For indx2 = 1 To indx1
ioutput=ioutput&"*"
Next
print ioutput
ioutput=""
Next

Is This Answer Correct ?    2 Yes 1 No

write a vb script to generate the following pattern ***** **** *** ** *..

Answer / nilesh banjare

Num=InputBox("Please enter the number")
For j = 1 To Num Step 1
str= ""
For i = Num to j step -1
m="*"
str = str & m

Next
print str
Next

OUTPUT:-
*****
****
***
**
*

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More VB Script Interview Questions

What is string concatenation function in VBScript?

2 Answers  


How to create a function in vbscript?

0 Answers  


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

0 Answers  


which is the good software training centre in bangalore?

1 Answers  


How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

0 Answers  






Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..

10 Answers   Amazon, CSC,


How many data types are supported in Vbscript?

3 Answers   Microsoft,


Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.

3 Answers   Amazon,


What is the use of the ‘open’ method to work with the database in the vbscript language and what connection string is passed in the same and what is its usage?

0 Answers  


Explain about filter expression?

0 Answers  


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

0 Answers  


What is the use of "Option Explicit"?

2 Answers  


Categories