#include
using namespace std;
int main() {
cout<<"Please enter a sentence in English."<
char sentence[500];
cin.getline (sentence,500);
int count = 0;
int i;
for(char *str = sentence ; str[i] ; str++) {
if((str[i] >= 'a' && str[i] <= 'z')||(str[i] >= 'A' && str[i] <= 'z')) {
count++;
}
}
cout<<"There are "<<count<<" letters in this sentence."<<endl;
return 0;
}
代码如上,请问大神for循环中的条件是什么意思呢?求讲的详细一些...