1. Write a function, calcTax, to calculate the tax using the table
Year income |
Rate |
<= 100,000 |
0% |
100,000 < income <= 500,000 |
12% |
500,000< income <= 1,000,000 |
15% |
1,000,000 < income <= 5,000,000 |
23% |
> 5,000,000 |
28% |
2. Write the data definition of date to represent. (วัน เดือน ปี)
- C definition / data example / code pattern
- Scheme definition / data example / code pattern
Hint:
5%2 == 1 and (mod 5 2) = 1
10%7 == 3 and (mod 10 7) = 3
21%4 == 1 and (mod 21 4) = 1