int main(int argc,char **argv)
{
int i;
printf("like ");
for(i=1;i
if(i==4) printf("or ");
printf("%s ",argv[i]);
}
printf("\n");
return 0;
}
应该符合要求吧
#include
int main(int argc, char *argv[]) {
if(argc<3) {
printf("at least input 2 arguments...\n");
return 0;
}
int i;
if(argc==3) {
printf("%s",argv[0]);
for(i=1;i
}
printf("\n");
}
else {
printf("%s",argv[0]);
for(i=1;i
}
printf(" or %s\n",argv[argc-1]);
}
return 0;
}
//---------------------------------------------------------------------------
#include
int main(int argc, char* argv[])
{
int i;
printf("like\t");
for (i=1; i
}
printf("or\t%s\n",argv[argc-1]);
return 0;
}
//---------------------------------------------------------------------------