……
他说的是孔明的和这份代码……
/*****************************************************************
** HighlightCodeV3.1 software by yzfy(雨中飞燕) http:// **
*****************************************************************/
#include <stdio.h>
#define N 10000
int c[N]={0};
int main()
{
int n;
FILE *a=fopen("a.txt","r"),
*b=fopen("b.txt","w");
if(!a||!b)return 1;
while (fscanf(a,"%d%*c",&n)!=EOF)c[n]++;
for (n=0;!c[n];n++);
fprintf(b,"%d",n);c[n]--;
while (n<N)
if (c[n]) fprintf(b,",%d",n),c[n]--;
else n++;
fclose(a);fclose(b);
return 0;
}
** HighlightCodeV3.1 software by yzfy(雨中飞燕) http:// **
*****************************************************************/
#include <stdio.h>
#define N 10000
int c[N]={0};
int main()
{
int n;
FILE *a=fopen("a.txt","r"),
*b=fopen("b.txt","w");
if(!a||!b)return 1;
while (fscanf(a,"%d%*c",&n)!=EOF)c[n]++;
for (n=0;!c[n];n++);
fprintf(b,"%d",n);c[n]--;
while (n<N)
if (c[n]) fprintf(b,",%d",n),c[n]--;
else n++;
fclose(a);fclose(b);
return 0;
}
他说的是孔明的和这份代码……