[ create a new paste ] login | about

Link: http://codepad.org/kuyLsV1z    [ raw code | output | fork ]

C++, pasted on Aug 8:
1
2
3
4
5
6
7
8
9
10
void sum() {
   int sum = 0;
   for (int i = 0; i <= 10; sum += i, ++i) {}
   cout << sum << endl;
}


int main() {
  sum();
}


Output:
1
55


Create a new paste based on this one


Comments: