U E D R , A S I H C RSS

CodeRace/2015.5.15/김정빈 (rev. 1.2)

Code Race/2015.5.15/김정빈

일등




#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));

}


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:56
Processing time 0.0660 sec