Right Click Disabled

Wednesday, February 22, 2012

VBScript code in QTP to create an array with five elements to store a student five subject marks and display maximum marks


Option explicit
Dim subject(4), i, max
For i=0 to 4 step 1
     subject(i)=inputbox("Enter marks :")
Next
max=subject(0)
For i=0 to 4 step 1
     If max<subject(i) Then
         max=subject(i)
     End If
Next
msgbox("Maximum marks : "&max)

No comments:

Post a Comment

Twitter Bird Gadget