flame_Zero
New Member
- Joined
- May 22, 2016
- Messages
- 6
Does anyone know how to code this as Sub main and functions? Help!!
When the program runs it will welcome the user and ask them which package (of 3) they are ordering, Basic, Premium or Extravagant. All tickets must be from the same package.
Users will enter B P or E (system must handle lower case as well as upper). Incorrect input will be met with an error message, and the user will be asked again until they get it right.
Regardless of which package they pick they will then be asked how many adult, child and concession tickets they are ordering. Numbers must be 0 or greater. Invalid input will result in an immediate error and re-prompt (ONLY for the invalid value).
The system will then calculate the total cost of the tickets using the following figures:
<tbody>
</tbody>
Premium prices are 2 times the price of the basic tickets. Extravagant prices are 5 times the price of the basic tickets.
If the total cost is more than $100 then there is a 1 in 10 chance of receiving a 20% discount. If necessary this discount is applied, and the user will be informed. The final ticket cost will then be displayed.
When the program runs it will welcome the user and ask them which package (of 3) they are ordering, Basic, Premium or Extravagant. All tickets must be from the same package.
Users will enter B P or E (system must handle lower case as well as upper). Incorrect input will be met with an error message, and the user will be asked again until they get it right.
Regardless of which package they pick they will then be asked how many adult, child and concession tickets they are ordering. Numbers must be 0 or greater. Invalid input will result in an immediate error and re-prompt (ONLY for the invalid value).
The system will then calculate the total cost of the tickets using the following figures:
| Basic |
Adult | 10 |
Child | 5 |
Concession | 8 |
<tbody>
</tbody>
Premium prices are 2 times the price of the basic tickets. Extravagant prices are 5 times the price of the basic tickets.
If the total cost is more than $100 then there is a 1 in 10 chance of receiving a 20% discount. If necessary this discount is applied, and the user will be informed. The final ticket cost will then be displayed.