#2353: IF小括號裡面的運算


qq100tea (qqtea)


希望在英文字母後如果遇到空白鍵就當是1個數字

IF裡面的判斷式該怎麼寫

#2354: Re:IF小括號裡面的運算


qq100tea (qqtea)


希望在英文字母後如果遇到空白鍵就當是1個數字

IF裡面的判斷式該怎麼寫



#include<stdio.h>
#include<math.h>
int main()
{
    int l;
    int i;
    int real;
    int max;
    char ch[99];
    while(gets(ch)!=EOF)
    {
    real = 0;                  
    l = strlen(ch);
    max = l-1;   
    if(l%2==0)
              for(i=0;i<=l/2;i++)
              {
                      if(ch[i]==ch[max-i])                                     
              }
    else
    }
   
   
    system("pause");
    return 0;
}

SORRY 程式碼已補上

#2361: Re:IF小括號裡面的運算


example (學姊)


希望在英文字母後如果遇到空白鍵就當是1個數字

IF裡面的判斷式該怎麼寫


是這個意思嗎

if(  ch == '0' ) {

    ...

}