数组

数组

伪代码

    integer a[5]
    Set i to 0
    WHILE(i < 5)
      Read in  a[5]
      Set i to i + 1

    Read num
     
    Set position to 0
    Set found to FALSE
    WHILE(position < 5 AND found is FALSE)
        IF(a[] equals num)
            Set found to TRUE
        ELSE
            Set position to position + 1
posted on 2023-11-06 18:37  GisliW  阅读(2)  评论(0编辑  收藏  举报