Cis170A_iLabWK3_Ayala

PrivateSubbtnCalculate_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) HandlesbtnCalculate.Click

DimnumCars = CInt(txtNumCars.Text)

WhilenumCars 500

MsgBox("Max limit of cars is 500")

txtNumCars.Text = "0"

numCars = 0

txtNumCars.Focus()

EndWhile

DimNumTickets = CInt(txtNumTickets.Text)

WhileNumTickets 3000

MsgBox("Max number of tickets sold cannot exceed 3000:")

txtNumTickets.Text = "0"

NumTickets = 0

txtNumTickets.Focus()

EndWhile

DimnumPopcorn = CInt(txtPopcorn.Text)

WhilenumPopcorn 4500

MsgBox("Max limit of popcorn is 4500:")

txtPopcorn.Text = "0"

numPopcorn = 0

txtPopcorn.Focus()
Powered by