#include <stdio.h>
int main() {
int n = 10;
int first = 0, second = 1, next;
printf("Fibonacci Series: %d, %d, ", first, second);
for (int i = 3; i <= n; i++) {
next = first + second;
printf("%d, ", next);
first = second;
second = next;
}
return 0;
}
标签:10,数列,int,next,斐波,second,printf,那契,first From: https://blog.51cto.com/u_16284467/8259368