首页 > vc6中while循环出不来?

vc6中while循环出不来?

#include<stdio.h>
int main()
{
    int ch;
    int j=0;

    while((ch = getchar()) != EOF );
    {
        if( ch == '{')
        {
            j++;
        }
        if(ch == '}' && j!=0 )
        {
            j--;
        }

        if (ch=='}' && j==0 )
        {
            printf("no\n");
            return 0;
        }

    }
    if( j==0 )
    {
        printf("yes\n");
    }
    else
    {
        printf("no\n");
    }
    return 0;   
}

为啥那while循环出不来


while后面去掉分号

【热门文章】
【热门文章】