U E D R , A S I H C RSS

피보나치/김소현,임수연

~cpp 

#include <stdio.h>

void main(void)
{
	int input;
	int first=1, second=1, sum=1;

	printf("입력하시오");
	scanf("%d", &input);

	for(int i=2; i<input; i++)
	{
		sum=first+second;
	    first=second;
		second=sum;
	}
	printf("%d", sum);
}

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-05-27 07:09:19
Processing time 0.3910 sec