fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main() {
  5. int n , sm = 0 , tmp ;
  6. cin >> n ;
  7. for (int i = 0; i < n ; i ++){
  8. cin >> tmp;
  9. sm += tmp;
  10. }
  11. cout << sm;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty