U E D R , A S I H C RSS

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

No older revisions available

No older revisions available



~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 2021-02-07 05:31:27
Processing time 0.0255 sec