write a vb script to generate the following pattern

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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain a few date functions in vbscript

556


Explain about filter expression?

563


I want to run QTP script on Linux server is it possible to do this by connecting Windows to Linux through VPN/Terminal Server and just run the script on Linux server.

1786


Anyone have qtp11.0 crack?

2382


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2259






Mention what are the rules to name variable in vbscript?

538


How to access array data?

543


What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?

577


Differentiate javascript and vbscript?

567


Which function is used in the vbscript language to convert the specified expression into a date type value?

520


Mention what is the technology used by vb script?

523


What are the 2 ways to pass a value to the function?

513


What is select case statement?

602


What are the rules to name variable in vbscript?

587


Explain about the functionality of vb script?

567