#include<stdio.h>
main(int argc,char *argv[])
{
if (argc==2)
{
FILE *text=fopen(argv[1],"r");
if (text!=NULL)
{
int count=0;
char line[80];
while(fgets(line,80,text)!=NULL)
{
printf("%s",line);
if(count==22)
{
printf("press any key to continue:\n");
getchar();
count=0;
}
else count++;
fclose(text);
}
}
else printf("\n\n error open file %s !\n\n",argv[1]);
}
else printf("\n\n format should be:ftype textname\n\n");
}
帮忙解释运行并修改完善此上代码。明天急救的。谢谢。