fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. int n;
  5. double s = 0;
  6. std::cin >> n;
  7.  
  8. for (int i = 0; i < n; ++i) {
  9. double t;
  10. std::cin >> t;
  11. if (t > 0) {
  12. s += t;
  13. }
  14. }
  15.  
  16. std::cout << s;
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1.01591e-305