Quality Testing

Quality is delighting customers

what error in my program? Can any one resolve this error plz?

what error in my prg
Option explicit
Dim marks[4],i,tot
For i=0 To 4 step 1
marks[i]=inputbox("enter subject marks")
Next
tot=0
For i=0 To 4 step 1
tot=cint(tot)+cint(marks[i])
Next
msgbox(tot)

Views: 147

Reply to This

Replies to This Discussion

Try now with the below code:

Option explicit

Dim marks(4),i,tot

For i=0 To 4 step 1

marks(i)=inputbox("enter subject marks")

Next

tot=0

For i=0 To 4 step 1

tot=cint(tot)+cint(marks(i))

Next

msgbox(tot)

Hi Divya.... While declaring and using array, you have used wrong parenthesis "[]" instead of "()".

thank u.

Use small brackets "()" instead of square brackets "[]"

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service