Practice+Algorithms

1. Groovy-Shirts Ltd sell designer T-Shirts in bulk to shops. The standard price which the company sells the T-Shirts for is £20, but they provide a discount on larger orders as follows: Shops ordering 10 T-Shirts pay full price (£20).

Shops ordering 20 T Shirts receive a discount of £1 (£19)

Shops ordering 30 T Shirts receive a discount £2 (£18)

and so on, up to orders of 100 T Shirts Groovy-Shirts Ltd want to be able to display a table showing the quantity of T-Shirts and the total price.

2. A large supermarket chain needs a program to calculate the average cost a food receipt. The user should enter up to 6 receipts and the average will be displayed.

3. The BBC are running a goal of the month competition. They show the viewers 5 goals (labelled A, B, C, D, E) and viewers have to choose which goal they think is best. BBC require a program to keep a total of the number of votes for each goal. The program should use a single array with 5 elements of type Integer to count the goals: Dim goal_votes(5) As Integer

The program should allow the user to enter either A, B, C, D, E or X to exit. Any other input should be flagged as invalid

When the user enters the value X, the program should display a running total of all of the goals A-E