how to find greatest of n numbers!

Answer Posted / venkatesh

option explicit
dim myarray,max,i
myarray = array( 34,23,45,67,12 )
max=myarray(0)
for i=0 to ubound(myarray)
if max < myarray(i) then
max=myarray(i)
end if
next
msgbox "max number is : "&max

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of vbscript?

644


What is the main difference between function and sub-procedure?

549


How will you check that a variable is an array in vbscript?

542


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

529


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

520






Explain about the support of asp for vb script functionality?

527


Mention how you can call vbscript functions?

581


How can you create a file object to work with the files in the vbscript language?

505


how to automatically update the sql server2005 database records when insert in vb6?

1485


I need to get some data from data base and store this (retrieved) data in a excel sheet using VB script in QTP9.0 I have created connection for data base I have created as excels sheet by using Set XL=CreateObject("Excel.Application") XLworksheet.cells(1,1).value= rs.fields.item("<>") I have taken a for loop and changed the cells values (1 as i and another 1 as j) But still I am not able to get Plz kindly tell me know this . It is very urgent

1769


Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

1721


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

572


What is the difference between vb debugger and the script debugger?

586


What is the difference between a dictionary and an array?

577


What is vbscript?

595