M2RTY
Member
Registered: 25th May 01
User status: Offline
|
Cnst Max = 5
Dim First number as integer
Dim Secondnumber as integer
Private Sub cmdAdding click ()
Dim Total as single
Dim result as integer
For I = 1 to 8 do
Firstnumber = Inputbox("Please Enter a whole number")
Secondnumber = Inputbox("Please Enter another whole number")
Total = Firstnumber + Secondnumber
If Total < 50 then
Thitdnumber - Inputbox ("please enter another number")
Result = total / Thirdnumber
Msgbox "Your numbers were too small" & result
Else
Msgbox "thank you" & total
End
End sub
need to find 4 errors in this
any help??
off an exam paper
cheers
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
Dim First number as integer = Dim Firstnumber as integer
Private Sub cmdAdding click () = Private Sub cmdAdding click()
For I = 1 to 8 do = For I = 1 to 8
Theres no End If before the End Sub
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
also
Thitdnumber - Inputbox ("please enter another number") should be Thitdnumber = Inputbox ("please enter another number")
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
and
Dim Total as single = Dim Total as integer
Cnst Max = 5 should be Const Max = 5
also, wtf does this function do? and where does the Max const come in? Its just a load of bollocks which doesnt do alot by the looks of it lol
|
chris_uk
Premium Member
Registered: 8th Jul 03
User status: Offline
|
wtf
[Edited on 12-06-2004 by chris_uk]
|
M2RTY
Member
Registered: 25th May 01
User status: Offline
|
quote: Originally posted by VisibleMan
also
Thitdnumber - Inputbox ("please enter another number") should be Thitdnumber = Inputbox ("please enter another number")
sorry that was a typo lol
|
M2RTY
Member
Registered: 25th May 01
User status: Offline
|
quote: Originally posted by VisibleMan
and
Dim Total as single = Dim Total as integer cheers, got this 1
Cnst Max = 5 should be Const Max = 5 cheers, got this 1
also, wtf does this function do? and where does the Max const come in? Its just a load of bollocks which doesnt do alot by the looks of it lol
|
M2RTY
Member
Registered: 25th May 01
User status: Offline
|
quote: Originally posted by VisibleMan
Dim First number as integer = Dim Firstnumber as integer cheers, got this 1
Private Sub cmdAdding click () = Private Sub cmdAdding click() same thing?????????????????????????
For I = 1 to 8 do = For I = 1 to 8 cheers, got this 1
Theres no End If before the End Sub
|
Paul_J
Member
Registered: 6th Jun 02
Location: London
User status: Offline
|
quote: Thitdnumber - Inputbox ("please enter another number")
Result = total / Thirdnumber
Surely its Thirdnumber and not Thitnumber??
Also where has Thirdnumber been declared and initialised?? I see Dim First and Dim second but no third.
|
M2RTY
Member
Registered: 25th May 01
User status: Offline
|
quote: Originally posted by Paul_J
quote: Thitdnumber - Inputbox ("please enter another number")
Result = total / Thirdnumber
Surely its Thirdnumber and not Thitnumber??
Also where has Thirdnumber been declared and initialised?? I see Dim First and Dim second but no third.
yep i need 2 declare it
do all the declared bits need to go BEFORE the private sub starts or AFTER? at the mo it has 2 before and 2 after
|