要求通过while循环不断读入字符,当读入字母N时结束循环。若变量已正确定义,以下正确的程序段是( )。
(A)while(eh=getchar( )='N')pfintf("%c",ch);
(B)while((ch=getchar( ))!='N')pfintf("%c",ch);
(C)while(ch=getchar( )=='N')pfintf("%c",ch);
(D)while((ch=getchar( ))=='N')pfintf("%c",ch);
查看解析
参考答案
继续答题:下一题

