这程序有难度吗?用什么语言写呀?
int N = 10;
int sum1,sum2,count1,count2;
for(int i = 0 ;i < N; i++){
int input = 接收输入内容;
if(input > 0){
sum1 += input;
count1++;
} else {
sum2 += input;
count2++;
}
}
这程序有难度吗?用什么语言写呀?
int N = 10;
int sum1,sum2,count1,count2;
for(int i = 0 ;i < N; i++){
int input = 接收输入内容;
if(input > 0){
sum1 += input;
count1++;
} else {
sum2 += input;
count2++;
}
}