使用while(cin >> n),在devc++中无法输出结果
#include<iostream>
using namespace std;
int main(){
int N, n, sum;
cin >> N;
while(cin >> n){
sum += n * 11 *(N-1);
}
cout << sum;
return 0;
}
使用while(cin >> n),在devc++中无法输出结果
#include<iostream>
using namespace std;
int main(){
int N, n, sum;
cin >> N;
while(cin >> n){
sum += n * 11 *(N-1);
}
cout << sum;
return 0;
}