作者在 2009-02-13 10:03:10 发布以下内容
				/* 1st version */
#include<stdio.h>
int main(void)
{
    int c, nc;
    nc = 0;
    while((c = getchar()) !=EOF)
    {
        ++nc;
    }
    printf("%d",nc);
    getch();
    return 0;
}
======================
/* 2nd version */
#include <stdio.h>
int main(void)
{
    int c, nc;
    for (nc = 0; (c = getchar()) != EOF; ++nc)
        ;
    printf("%d",nc);
    getch();
    return 0;
}