把a數組中所有大小寫字母存放數組b中?
回答:int a[22] = {0}; int b[22] = {0}; scanf("%s",a); int i = 0; while(a[i] != '\0') { if((a[i]>='A' && a[i]='a' && a[i] b[i] = a[i]; i++; } printf("%s\n",b);
把a數組中所有大小寫字母存放數組b中?
回答:int a[22] = {0}; int b[22] = {0}; scanf("%s",a); int i = 0; while(a[i] != '\0') { if((a[i]>='A' && a[i]='a' && a[i] b[i] = a[i]; i++; } printf("%s\n",b);