• 位置:网教试题 >> 浏览试题

要求通过while循环不断读入字符,当读入字母N时结束循环。若变量已正确定义,以下正确的程序段是( )。

2021/9/28

A.while((ch=getchar())!='N ') printf(”%c”,ch);

B.while(ch=getchar()!='N ') printf(”%c”,ch);

C.while(ch=getchar()=='N ') printf(”%c”,ch);

D.while((ch=getchar())=='N ') printf(”%c”,ch);

查看答案

关于网站 - 联系我们 - 网站地图
版权所有:湖北自考服务中心网