Professional Documents
Culture Documents
CAPE Computer Science Unit 1 - Proposal
CAPE Computer Science Unit 1 - Proposal
Recommended text:
1. C for Dummies, Gookin Dan. Available at https://hmt.es/C%20for%20Dummies.pdf
General requirement: Candidates are expected to choose a problem for which a software solution is
appropriate and create an algorithm for the solution using sequencing, selection, assignments, iteration
(bounded and unbounded). They should represent their algorithms using any combination of narrative,
flow charts and pseudocode. Candidates are expected to implement the algorithm in C using arrays with
no less than five functions and create a test plan.
1. Write a program in C that takes any integer value as input and outputs the remainder of that number
when it is divided by 2. In other words, write a program to compute n mod 2, where n is any integer
value.
2. Consider the following denominations of the US dollar: 25 cents (quarter), 10 cents (dime), 5 cents
(nickel) and 1 cent (cent/penny). Write a program that computes the change for any given input
value.
For example: Given $2.27, your program should output 8 quarters, 2 dimes, 1 nickel and 3 cents.
Note:
1. Remember to give meaningful names to any variables used.
2. Use indentation to make your code more readable.
3. Use comments where necessary to keep track of the logics of your program.
4. Your program should be user-friendly (user prompts and proper display of output)