int wflag;

    int wcount = 0;

    while(c = getchar())

    {

    if(c == ' ' || c == '\t')

    {

      wflag = 0;

    }

    else if(wflag == 0)

    {

      wcount++;

      wflag = 1;

    }

  }

 

 

 

 

 posted on 2012-10-09 16:28  飞翔@骑士  阅读(129)  评论(0编辑  收藏  举报