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

can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)

3 Answers   Bally Technologies,


Why to add checkpoint in QTP What's the purpose of checkpoints & how to add it

2 Answers  


Which operator is used to concatenate the 2 values in the vbscript language?

0 Answers  


How to pass argument by reference to a function in vbscript?

0 Answers  


write a vb script to create a folder?

3 Answers  


int a=4857 i need output as 7584.without using any inbuild function?

6 Answers   Aspire,


How to access array data?

0 Answers  


Hi, can any one tell this Actually I AM NEW TO QTP I have one qtp script in which it calls the vbs file during it's run TIME by using the ExecuteFile "absolute path" If the vbs file is executed seperately it will give the output in a msgbox In the same way if qtp script is executed the result will be displayed in w result window right? Now the question is how to get that vbs file output in the qtp result window when I run the qtp script which calls the vbsfile during it's run TIME

1 Answers  


What are the uses of vb script?

0 Answers  


What is loose binding? Why is it not a good practice to use it?

0 Answers  


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

3 Answers   Amazon,


Hi I don't have any idea on VBscript. can any one point me to a good web site to learn VBscript. Regards lina

2 Answers  


Categories