/* Note:Your choice is C IDE */
#include "stdio.h"
void main()
{
int a[12]={1,1};
int i=2;
printf("%d\t%d\t",a[0],a[1]);
for(;i<=11;i++)
{a[i]=(a[i-1]+a[i-2]);if (i%3==0) printf("\n");printf("%d\t",a[i]);}
}
(1)创建一个Windows Consol程序,选择让VC6自动生成一个“Hello World”,然后把你要试验的代码拷到main函数之前,然后在main函数里调用新加的函数即可。
(2)上述生成的控制台程序,缺省main函数是放在.CPP文件里,stdafx后缀名也是.cpp。要把这两个文件的后缀名都改成.c,另外要在project-->setting-->C/C++的project options里,把/Yu"stdafx.h"删掉,否则编译时会报错fatal error C1853: 'Debug/PtAss.pch' is not a precompiled header file created with this compiler。