第1个回答 2010-10-20
你可以将输入操作放到循环中,用计数器实现,比如
int a;
int count=0;
while(cin>>a){
count++;
}本回答被网友采纳
第2个回答 2010-10-20
都知道得到n(n-1)/2个和了,最后的和的数量是知道的,N你就不会算么- -
第3个回答 2010-10-20
int a;
int count;
cin>>a;
while(a)
{
count++;
cin>>a;
}
第4个回答 2010-10-30
其实回答问题之前你们应该在电脑上编译一下看能不能达到楼主想要的效果。。。。