#include<stdio.h> int sum(int i){ if (i != 1) { return sum(i - 1) + i; } else { return 1; } } int main() { int fin=0; int inp = 0; printf("입력 : "); scanf("%d",&inp); printf("%d", sum(inp)); }