1.#includevoid main(){int i,f1,f2,f3,a,b,n; // 数据定义while(1){f1=1;f2=1;scanf("%d%d%d",&a,&b,&n);//参数读入if(a==0&&b==0&&n==0)break ;for(i=3;i void main(){int i,f1,f2,f3,a=1,b=2;f1=1;f2=1;printnf("8%d8%d",f1,f2);for(i=3;i<43;i++){f3=(a*f2+b*f1)%7; //递推计算if ((i-1)%8==0) printf("\n");printf ("%8d",f3);f1=f2;f2=f3;}printf ("%d\n"); }3..#include void main(){int i,j,a,b,f[50],k,m;long n;while(1){f[1]=1;f[2]=1;scanf("%d%d%d",&a,&b,&n);if(a==0&&b==0&&n==0)break ; for(i=3;i<43;i++){f[i]=(a*f[i-1]+b*f[i-2])%7; for(j=2;j