c语言continue的运用

while(getchar ()!='\n))
continue;
printf("Please type another letter or a #.\n");

请问printf这一条还是在while循环中的语句吗

如果你的while语句,没有用{}的话,那么它只能接一条语句。
在这里,只有continue是在while循环里的,printf不在
continue的功能是,回到条件的判断部分。

不在
不加大括号的话,循环体只有后续的一条语句。因此相当于

while(getchar ()!='\n))
{
     continue;
}
printf("Please type another letter or a #.\n");

属于,但是不会被执行

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632