题解 | #两数求和#
两数求和
http://www.nowcoder.com/practice/f1b704af4f654be285552bea53ce6534
#include<iostream>
using namespace std;
int main(){
int Num, Total = 0;
while(cin >> Num){
Total += Num;
}
cout << Total << endl;
return 0;
}
两数求和
http://www.nowcoder.com/practice/f1b704af4f654be285552bea53ce6534
#include<iostream>
using namespace std;
int main(){
int Num, Total = 0;
while(cin >> Num){
Total += Num;
}
cout << Total << endl;
return 0;
}
相关推荐