You are on page 1of 3

1.

Task 1 – Problem Decomposition

2.

3. a)

4.

5. b)

6. PROGRAM <ATM_WITHDRAWAL>

7. 1. DISPLAY 'Enter amount to withdraw’;

8. 2. INPUT amount;

9. 3. READ balance;

10. 4. dispense cash amount;

11. 5. balance = balance – amount;

12. 6. DISPLAY 'Your balance is’, balance;

13. END

14. Task 2

15.

16. PROGRAM <ATM_WITHDRAWAL>

17. 1. IF card inserted

18. 2. DISPLAY 'Enter amount to withdraw’;

19. 3. INPUT amount;

20. 4. READ balance;

21. 5. dispense cash amount;

22. 6. balance = balance – amount;

23. 7. DISPLAY 'Your balance is’, balance;

24. 8. ENDIF

25. END
26.

27. Task 3

28. a)

29. DECLARE integer correctPIN ;

30. DECLARE integer pin;

31. b)

32.

33. PROGRAM <ATM_WITHDRAWAL>

34. 1. DECLARE boolean valid ;

35. 2. DECLARE integer correctPIN ;

36. 3. DECLARE integer pin;

37. 4. SET valid = false ;

38. 5. IF card inserted

39. 6. DO

40. DISPLAY ‘Enter your PIN’;

41. INPUT pin;

42. READ correctPIN;

43. IF pin = correctPIN

44. valid = true;

45. ENDIF

46. 7. WHILE valid = false;

47. 8. ENDIF

48. 9. DISPLAY 'Enter amount to withdraw’;

49. 10. INPUT amount;

50. 11. READ balance;


51. 12. dispense cash amount;

52. 13. balance = balance – amount;

53. 14. DISPLAY 'Your balance is’, balance;

BMI

Direction: Your task is to write down the BMI or the Body Mass Index of your family members.
Write his/her full name, age, height, weight, BMI and classification.
NAME AGE HEIGHT WEIGHT BMI CLASSIFICATION

You might also like