Anonymous
Anonymous asked in 電腦與網際網路程式設計 · 1 decade ago

幫我註解一下這段程式~~~~~~急需!!

{                                B[mi ]=aa[i ];                                    if(aa[i]=='M'  &&  aa[i 1]=='E'                                            && aa[i 2]=='N' && aa[i 3]=='D')                                           break; //回到B                     }

1 Answer

Rating
  • Favorite Answer

    這應該只是片段程式吧,可能要搭配前後文才知道主要用途。就字面上來看,主要是說當aa陣列裡的元素值i=M且i+1=E且i+2=N且i+3=D的時候就跳離開這段程式。若這段程式是架在迴圈底下,就跳離迴圈。方便的話把前面的程式貼出來會比較容易了解這段程式為什麼要這樣寫。感覺上像是讓使用者輸入一個字串,只要輸入MEND的話就跳離程式。看起來是這樣啦^^,參考看看

    Source(s): 二姐
Still have questions? Get your answers by asking now.