Page 52 - My Own Workbook for CSEC Information Technology Examinations
P. 52
My Own Workbook for CSEC® Information Technology Examinations
SIMPLE CONDITION WITH ALTERNATIVE ACTION
22. Develop an algorithm which accepts two values, selling Price and buyingPrice. The buyingPrice is to be subtracted from sellingPrice and the result placed in a variable named profit. If profit is less than or equal to zero, display a message indicating “Sorry, there is no profit”.
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
........................................................................................................................................
93
IT-book-edited-8,3x11,7.indd 96
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