View Code of Problem 30

#include<cstdio>
#include<cmath>
using namespace std;
int main(){
	int a,b;
	double x;
	char c;
	while(scanf("%d",&a)!=EOF){
		printf("%d\n",(1+a)*a/2);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 30