c语言中输入将由多行正整数组成,每行一个正整数,数0表示输入结束用什么语句。

如题所述

第1个回答  2013-04-27
int n;
while(scanf("%d", &n) != EOF)
{
if (n==0) break;
  ...
}本回答被网友采纳
相似回答