how to find greatest of n numbers!

Answer Posted / mudaseer

dim varr(4),vhigh
for i=0 to 4 step 1
varr(i)=cint(inputbox("enter the value"))
next
vhigh=varr(0)
for i=1 to 4 step 1
if varr(i)>vhigh then
vhigh=varr(i)
end if
next
msgbox vhigh

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Description.Create

2160


how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.

4741


How to Import data from a file (file is on the desktop) to the data table

1554


What is dictionary object in vbscript? Explain?

623


Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?

2585






What is the use of the date function in the vbscript language?

560


Write a code to print numbers from 5 to 0?

673


Explain vbscript in detail?

615


I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..

1801


A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.

1506


What are the rules to name variable in vbscript?

585


Which keyword is used to declare a variable in the vbscript language?

529


How will you convert a string to upper case string using vbscript?

551


How to write functions and sub in vb script?

620


Explain about arrays in vb script?

602