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

Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...

0 Answers  


what is the differenece btwn scripting language and programming language

4 Answers  


Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository

0 Answers  


What are class events?

0 Answers  


Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.

12 Answers   Amazon, Pyroferus,






write a vb script to display factorial of a number using function

1 Answers  


How to access array data?

0 Answers  


what is the use of Data base check point ?

3 Answers  


Which loop is used in case of arrays in the vbscript language?

0 Answers  


Explain the functionality of vbscript?

0 Answers  


in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script

2 Answers  


What are the properties of regexp object?

0 Answers  


Categories