fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. int sum = 0;
  6.  
  7. for( int i = 0; i < 10; ++i )
  8. sum += i;
  9.  
  10. std::cout << "sum: " << sum << std::endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
sum: 45