Pseudo code shows the logic. You have to implement it in PicBasic or any language you choose.