#include <stdio.h>

int sum(int n){
	int c = 0;
	int d;
	while(n -- < 1)
		c ++;
		d = c + d;
		return d;
}

int main(void) {
	int a,b;
    a = 10;
    b = sum(a);
    printf("1から%dまでの和は%d", a,b );
	return 0;
}
