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 2021-02-07 05:31:28
Processing time 0.0164 sec