【发布时间】:2019-08-04 15:49:32
【问题描述】:
因此,对于我在 12 年级开始之前的 A Level 计算机科学暑期任务,我得到了一项任务,我必须将流程图转换为伪代码。
这是任务:https://www.leggott.ac.uk/wp-content/uploads/2019/07/SummerTask-JLC-Programming.pdf
到目前为止,我得到了这个:
// checking the patient's skin condition
skin_condition = input "Does skin appear normal? (Y/N)"
if skin_condition = N then
output "check pulse, call doctor"
endif
respiratory_status = input "Is the paitent breathing normally? (Y/N)"
// checking the patient's respiratory staus
if respiratory_status = N then
output "check for obstructions, call doctor"
endif
temperature = input "What is the patients body temperature?"
// checking the patient's body temperature
if temperature < 95 then
output "add additional blankets to warm patient"
endif
neurological_status = input "Can the patient move or respond? (Y/N)"
// checking the patient's neurological status
if neurological_status = N then
output "check consciousness, call doctor"
endif
cardiovascular_status = input "Does the patient have a normal pulse rate? (Y/N)"
// checking the patient's cardiovascular status
if cardiovascular_status = N then
output "check consciousness, call doctor"
endif
output "monitor patient every hour or as necessary"
【问题讨论】:
标签: pseudocode