Selection Exercises

1. Develop a program to read an examination mark. It should display a Pass if the mark lies between 40% - 60% (inclusive), Merit if it lies above 60% and Fail if it lies below 40%.
[Specimen answer]

 

2. Develop a program to process a set of account transactions. All positive amounts should be accumulated as credits. All negative amounts should be accumulated as debits. The total credits and debits for the period should be displayed. The program should ask the user if there is more input and terminate when the user responds with 'n' or 'N'.
[Specimen answer]