U E D R , A S I H C RSS

CodeRace/2015.5.15/S'팀 (rev. 1.5)

Code Race/2015.5.15/S'팀

스팀은 좋은겁니다

3.
#include<stdio.h>
int main()
{
	int j = sum(100);
	printf("1부터 100의 합은 : %d\n",j);
	return 0;
	
}

int sum(int n)
{
	int a = 0;
	if (n == 0)
	{
		return n;
	}
	else
	{
		a += n;
		a += sum(n - 1);

	}
	return a;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:56
Processing time 0.0129 sec