how to find greatest of n numbers!
Answers were Sorted based on User's Feedback
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 ? | 8 Yes | 2 No |
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 ? | 8 Yes | 4 No |
Inorder to avoid Message box while writing script which alternative method can be used?
What if you do not specify anything when you call a procedure?
How to pass the parameter from one function to another function in VB Scripting?
How regexp.execute method works?
What are the data types supported by vbscript?
Difference between Function and Sub routine?
Why do we use Option Explicit?
Mention what is vbscript procedures?
how to write function to validate the number of characters entering into the text box?
How to create a function in vbscript?
What is the difference between function and procedure?
generic function for webedit box for web application