for(int a=0;a<11;a++){ }
showStatus("help me~");

解决方案 »

  1.   

    for(int a=0;a<11;a++){
      if(x==d) {
         if(a<10) showStatus("either you know");
         else showStatus("aha,you know the secret!.");
         return;
      }
     }
    showStatus("help me~");
      

  2.   

    for(int a=0;a<11;a++){
      if(x==d) {
         if(a==10) showStatus("aha,you know the secret!.");
         else showStatus("either you know");
         return;
      }
     }
    showStatus("help me~");
    这样也行!
      

  3.   

    为什么要for循环???
    你这样每次触发a都会加到10了
    应该每响应一次,a++