Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pseudocode Code
- 1. START
- 2. Display "Welcome to The Hospital"
- 3. Display "Please enter your name, IC, Date and phone_number"
- 4. Input Please enter your name, IC, Date and phone_number
- 5. Display”What type of service do you want to get?’
- 6. Display “Enter 1 for consultation, 2 for other types of services 3 for surgery”
- 7. Input i
- 8. If I=1
- 9. Display “You have chosen consultation service”
- 10. Display “Please wait for your name to be called in front of room 1 to 5”
- 11. Display “What is your problem? 1Flu 2Wound 3Cough”
- 12. Input D
- 13. If D=1
- 14. Display “What is your temperature?”
- 15. Input c
- 16. If c>=29.0
- 17. Display “You need to be checked and warded”
- 18. Else
- 19. Display “You have a normal fever”
- 20. Goto payment
- 21. Else if D=2
- 22. Display “The wound need to be disinfect and bandaged
- 23. Got payment
- 24. Else if D=3
- 25. Display “Does your tonsil have inflammation?”
- 26. Input Y/N
- 27. If Y (goto line 14)
- 28. Else
- 29. Display “You have normal 5 cough”
- 30. else
- 31. goto line 11
- 32. if i=2
- 33. Display “You have chosen other services”
- 34. Display “Please wait for your name to be called in front of room 6 to 8”.
- 35. Display”What is your health issue?”.
- 36. Display”Is it a serious problem?(Y /N)”
- 37. Input d
- 38. If d=4
- 39. Display”You will be checked thoroughly”
- 40. Else
- 41. Display“You will be checked normally”
- 42. Goto payment
- 43. If i=3
- 44. Display “You have chosen other services”
- 45. Display “Please wait for your name to be called in front of room 6 to 8”
- 46. Display”Do you have an appointment?”
- 47. Input Y/N
- 48. If y
- 49. Display”Set and appointment with the doctor for another day”
- 50. Goto line 35
- 51. Else
- 52. Display”What type of surgery do you need?”
- 53. Display” 6 for optometrist 7 for audiologist 8 for neurology”
- 54. Input D
- 55. If D=6
- 56. Display” Please go to the optometrist department”
- 57. Goto payment
- 58. Else if D=7
- 59. Display” Please go to the audiologist department”
- 60. Goto payment
- 61. Else if D=8
- 62. Display” Please go to the neurology department”
- 63. Goto payment
- 64. .
- 65. .
- 66. D=P
- 67. If P=1
- 68. Display”Your service charge is RM10"
- 69. Else if P=2
- 70. Display”Your service charge is RM10"
- 71. Else if P=3
- 72. Display”Your service charge is RM10"
- 73. Else if P=4
- 74. Display”Your service charge is RM5
- 75. Else if P=5
- 76. Display”Your service charge is RM5"
- 77. Else if P=6
- 78. Display”Your service charge isRM800”
- 79. Else if P=7
- 80. Display”Your service charge is RM10"
- 81. Else
- 82. Display”Your service charge is RM1500”
- 83. Display”Your total payment will be”
- 84. Display payment,P
- 85. Display” Do you want to pay with cash or card?”
- 86. 1 for Cash 2 for Card 3 for e- wallet
- 87. Input C
- 88. If C=1
- 89. Display”Please pay according the receipt shown using cash”
- 90. Input M
- 91. Balance,B= M – P
- 92. Display”Your balance will be”
- 93. Display Balance,B
- 94. Display type_of_service,tax,payment
- 95. Display”Thank You’
- 96. If C=2
- 97. Display”Please enter your card information” 98. Is the card valid?
- 99. If Y
- 100. Display type_of_service,tax,payment
- 101. Display”Thank You’
- 102. Else
- 103. Display”Your card is not valid, do you want to try again?(Y/N)”
- 104. If Y (goto line 97)
- 105. Else (goto line 89)
- 106. If C=3
- 107. Display”Please Enter Wallet name”
- 108. Input wallet_name
- 109. Display“Thank you your Payment has been received”
- 110. Display”Thank You
- 111. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement