# include
# define LEN 100
void main()
{
int den[LEN],num[LEN];
unsigned i,n;
den[0]=2;
den[1]=3;
num[0]=1;
num[1]=2;
for(i=2;i
{
den[i]=den[i-1]+den[i-2];
num[i]=num[i-1]+num[i-2];
}
printf("请输入:");
scanf("%d",&n);
for(i=0;i
{
printf("%d/%d\n",den[i],num[i]);
}
}
#include
#include
main()
{
int i;
int ii;
int x=1;
int x1=1;
int x2;
int y=0;
int y1=1;
int y2;
printf("Input:");
scanf("%d",&ii);
for(i=0;i
x2=x1+x;
y2=y1+y;
printf("\nOutput: %d / %d\n",x2,y2);
x=x1;
x1=x2;
y=y1;
y1=y2;
}
getch();
}