U E D R , A S I H C RSS

최소정수의합/이태양

~cpp
#include<stdio.h>
void sum(){
	int n=0,sum=0;

	while(1){
		n++;
		if(sum>=3000){
			break;
		}
		sum+=n;
	}
	printf("n=%d sum=%d\n",n,sum);
}	
int main(){
	sum();
	return 0;
}
- 그냥 메인을 줄여보고싶다는생각이..
----
최소정수의합
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-05-27 07:09:19
Processing time 0.0058 sec