View Code of Problem 30

#include<iostream>

using namespace std;

int main(void){
	int m;
	long long sum;
	while(cin >> m){
		sum=(m+1)*m/2;
		cout << sum << endl;
	} 
}

Double click to view unformatted code.


Back to problem 30