#include<stdio.h>
void printfCountAndSum(int,int);
int main(){
int a[200];
int count = 0;
int money;
int totalCount = 0;
while(scanf("%d",&money)!=EOF)
{
a[count++]= money;
totalCount += money;
printfCountAndSum(count, totalCount);
}
printf("result:count=%d, sum=%d\n",count, totalCount);
return 0;
}
void printfCountAndSum(int count,int sum) {
printf("count:%d, sum:%d\n",count,sum);
}
Yeah,我我好有童心啊,说真的,估计大一的时候这种程度的程序都算很简单的那一类了,但是真的,不知道为什么,当看到自己开发的东西能解决自己实际上的问题,竟然是这么的开心.