填空题

下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。 #include<stdio.h> #include<ctype.h> main() { char c; int a,s=0; while(______) if(isdigit(C) ) {a=c-’0’;s+=a;} printf("s=%d",s); }

【参考答案】

(c=getchar())!=’\n’