• 0

create if...elseif statement Visual basic


Question

Write an If..ElseIf  statement (or Select Case if you prefer) given the following:

 

decTicketPrice                    ?ticket price

intAge                                  ?age of customer   

 

If customer's age is less than 6, ticket price is Free

 

If customer's age is 6 to 12, ticket price is $3.50

 

If customer's age is 13 to 19, ticket price is $4.50

 

If customer's age is over 62, ticket price is $5.50

 

Otherwise, ticket price is $7.50

Link to comment
Share on other sites

Recommended Posts

  • 0

lol, that sounds interesting! :D

LOL...that is as bad as some of my instructors passing halfwits in my class that "kinda" got close to getting their program to compile.

Link to comment
Share on other sites

  • 0

Alright, but now I want a for-loop to add to the TicketPrice in 0.5 increments. The for-loop must be called from all places that populate the final value.

Do it!

Nah CBA. :D

Link to comment
Share on other sites

  • 0

LOL...that is as bad as some of my instructors passing halfwits in my class that "kinda" got close to getting their program to compile.

 

Exactly! :)

Link to comment
Share on other sites

This topic is now closed to further replies.