下面是我的code,
提交後出現WA(line6),
跪求大大們當我看看哪裡錯了><
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
int main()
{
bool Is_empty;
char one_word;
int word_count = 0, count = 0;
while((scanf("%c", &one_word))) {
if(count == 1) {
word_count++;
}
if((toascii(one_word) > 64 && toascii(one_word) < 90) || (toascii(one_word) > 96 && toascii(one_word) < 122)) {
count++;
Is_empty = false;
}
else if(one_word == ' ') {
count = 0;
Is_empty = false;
}
else if(count == 1) {
count++;
}
if(Is_empty == true)
break;
else if(one_word == '\n') {
printf("%d\n", word_count);
if(one_word != ' ' && word_count < 1) {
Is_empty = true;
}
count = 0;
word_count = 0;
}
}
return 0;
}