how to find greatest of n numbers!

Answer Posted / raju

dim i, lar, j, a()
i=Cint(Inputbox("Enter the value how many value to be enter"))
for j=1 to i
ReDim a(i)
a(j)=inputbox("enter the numbers")
Next
lar=a(0)
for j=1 to i
If a(j)>lar Then
lar=a(j)
End IF
Next
msgbox "Largest Number is" & lar

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1617


filter the array values without using filter function?

1654


How will you format a number in percetage format in vbscript?

587


how to increase the values in text box in a given text box increament by two values by clicking on button

1641


Which operator can be used to do an xor operation in vbscript?

676






What is dictionary object in vbscript? Explain?

623


How can you destroy an object in vbscript?

639


How to make sure that items in a wintree are sorted al?

2352


Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar

1961


Why to use option explicit in vb script?

592


What is vbscript language used for and which earlier language is it modeled upon?

529


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

511


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

520


give me any information abou vb script books learn quckly

1657


Explain about scrrun.dll?

528