how to find greatest of n numbers!

Answers were Sorted based on User's Feedback



how to find greatest of n numbers!..

Answer / 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

how to find greatest of n numbers!..

Answer / 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

how to find greatest of n numbers!..

Answer / 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

More VB Script Interview Questions

can u test the application without add-in?

1 Answers  


Here in my automation tool, i am retreiving some values and i need to store this values in the excel. How can i achieve this?. We are using VBA as scripting language. please let me know if you require any further inputs.

1 Answers  


How are values assigned to the variables in the vbscript language?

0 Answers  


How to find arry size in qtp vb script

2 Answers   Cap Gemini,


Difference between Function and Sub routine?

0 Answers   Polaris,






Is vbscript a case-sensitive or case-insensitive?

0 Answers  


What is a difference between scripting language and programming language?

2 Answers  


accept an email id & validate it .email id should not exceed 25 characters the mail id should contain 3 characters excluding domain name,@ and .(dot) the last 3 characters of the domain should be net,com or org

2 Answers  


If anyone knows abt Test Complete material, Pls let me Know. if u have any material or any documents..... Pls mail me on this mail Id...... This is very Urgent Requirment..... for my Project.....

3 Answers  


Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it

0 Answers  


When to use function procedures and what are its characteristics?

0 Answers  


What is Querystring collection?

0 Answers  


Categories