刚学c语言,编了n久的,望高手指点一二
#include<stdio.h>main()
{int a,b,c,d,i;
FILE *dfp;
if((dfp=fopen("f:d.txt","a"))==NULL)
{printf("no\n");
exit(1);
}
fprintf(dfp,"\n");
for(c=1;c<=9;c++)
{for(d=1;d<=c;d++)
{ i=c*d;
fprintf(dfp,"%d*%d=%d\t",d,c,i);
}
fprintf(dfp,"\n");
}
fclose(dfp);
}