int n; scanf(“%d”,&n); int a = 0,b = 1; for(int i =0;i<n;i++) { printf(“%d “,a); int c = a+b; a = b; b = c; } return 0;
//斐波那契数列,注意a,b,c位置替换