[정올] Language Coder_반복제어문1_자가진단2_code537 (C)

두비니

·

2020. 3. 8. 21:05

 

 

#include <stdio.h>

int main() {
	int a, sum = 0;

	scanf("%d", &a);

	for (int i = 0; i <= a; i++) {
		sum += i;
	}

	printf("%d", sum);

	return 0;
}