Page 55 - My Own Workbook for CSEC Information Technology Examinations
P. 55

My Own Workbook for CSEC® Information Technology Examinations
SEQUENCE: INTEGER DIVISION (DIV AND MOD)
27. Sasha’s Candle Shop manufactures scented candles in batches—vanilla: 100/batch, lemongrass:
200/batch, and coffee: 400/batch. Candles are packaged in gift boxes; three candles per box.
(a) Develop an algorithm which determines how many gift boxes Sasha can get from each batch of candles produced and the total number of candles unboxed after all flavours are packaged.
(b) Validate algorithm using the following:
(c) Implement the program using a programming language of your choice.
............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. ............................................................................................................................................................................................................. .............................................................................................................................................................................................................
97
Flavour
Vanilla
Lemongrass
Coffee
# Batches
2
3
4
IT-book-edited-8,3x11,7.indd 100
9/11/18 7:25 PM
Copyrighted material. All rights reserved.
DO NOT COPY THIS PAGE DO NOT COPY THIS PAGE DO NOT COPY THIS PAGE


































































































   53   54   55   56   57