C语言逻辑运算符实例 C语言多重嵌套if C语言统计程序实例 C语言逻辑运算符实例 // chcount.c -- use the logical AND operator #include <stdio.h> #define PERIOD '.' int main(void) { char ch; int charcount = 0; while ((ch = getchar()) != PERIOD) { if (ch != '"' && ch != '\'') charcount++; } printf("There are %d non-quote characters.\n", charcount); return 0; } C语言多重嵌套if C语言统计程序实例