[ create a new paste ] login | about

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

C++, pasted on Aug 13:
1
2
3
4
5
6
7
8
9
10
#include<iostream>
using namespace std;

int main(){
    int n = 0;
    for(int i = 1; i <= 100; i++){
        n += i;
    }
    cout << n;
}


Output:
1
5050


Create a new paste based on this one


Comments: