#include
int main()
{
int i,j,L=0;
char x[100];
int a[100];
int flag=0,temp=0;
FILE *p1=fopen("x.txt","r");
if(!p1)
printf("打开失败\n");
for(i=0;i<100;i++)
{
fscanf(p1,"%c",&x[i]);
if(flag==1&&(x[i]>='0'&&x[i]<'9'))
{
temp=temp*10+(x[i]-'0');
}
else if(flag==0&&(x[i]>='0'&&x[i]<'9'))
{
flag=1;
temp=(x[i]-'0');
}
else if(flag==1&&(x[i]<'0'||x[i]>'9'))
{
flag=0;
a[L++]=temp;
temp=0;
}
}
if(temp!=0)
a[L++]=temp;
fclose(p1);
p1=0;
printf("共有%d个数\n",L);
for(j=0;j{
printf("%d\n",a[j]);
}
return 0;
}