#include <stdio.h>int main(){int a,sum=0;scanf("%d",&a);while(a!=0){sum=sum+a;scanf("%d",a);
}printf("%d\n",sum);}
scanf("%d",a); a的前面漏了 ‘&’ 符号。