HLL+Exercise+2

Develop pseudocode algorithms for the following problems

1. Write a program which accepts as input the date, and produces as output a sentence which states whether that date is in the first week of the month or not.

2. Write a program which accepts as input the score for 2 teams in a football match: (a) score for Team A (b) score for Team B and then outputs whether the result of the match was a win for Team A, win for Team B or a draw

3. Write a program which accepts as input: (a) the time on a 12 hour clock (b) whether it is am or pm and then outputs the time in 24 hour clock format

4. Write a program which accepts as input a number between 1 and 12, and outputs the name of the month from January to December.

5. Write a program which counts from 1 to 100

6. Write a program which adds all the numbers between 1 and 8

7. Write a program which prints out the 1, 2, 3 and 4 times tables (//Hint: You will need a nested loop//)

8. Write a program which asks the user to enter a month (1 - 12), and continues to ask them until a valid month has been entered (//Hint: You will need a conditional While Loop//)

9. Each contestant in the game show “Total Knockout” must compete in five events. A program has been created to calculate the total and average points for each contestant. Write the algorithm for this program.

10. Write the algorithm for a program which calculates the average speed of a car, given the distance and time

11. RightIT, a software company, is currently developing a cash machine program for a bank. The cash machine will offer ﬁve options to customers: Cash withdrawal, Account balance, PIN services, Mobile top-up & Mini-statement

The options selected during a day are stored as a list. The bank would like the software to calculate the number of times the mobile top-up option appears on this list. Use pseudocode to design an algorithm to carry out this calculation.