#小白提问
#期望 抛出能被 5 整除的数字中所有偶数的和;
#实际结果会莫名奇妙多个10;
#代码如下
#include <stdio.h>
int a[] = {};
int i = 0;
char ct;
int text1(int a1[],int n);
int main() {
while(1){
scanf("%d",&a[i]);
ct = getchar();
if(ct == '\n'){
break;
}
i++;
}
printf("%d",text1(a,i));
return 0;
}
int text1(int a1[],int n) {
int sum = 0;
for (int j = 0; j < n; ++j) {
if(a1[j] % 5 == 0){
if(a1[j] % 2 == 0){
sum += a[j];
}
}
}
return sum;
}
**
#望解答