insert
Code:

#include<stdio.h>
int main(){
FILE *f,*f1;
int i, j;
f = fopen("problema29.txt", "r");
if (f==NULL) perror("error opening file");
else{}
char a[3][27];
f1=fopen("output.txt","w");
for (i = 0; i < 3; i++)
for(j = 0;j<27;j++) { fscanf(f, "%c", &a[i][j]);
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]=='|' && a[i+1][j+1]==' ' && a[i+1][j+2]=='|' && a[i+2][j]=='|' && a[i+2][j+1]=='_' && a[i+2][j+2]=='|') fprintf(f1,"%c",'0') //printf("0");
if (a[i][j]==' ' && a[i][j+1]==' ' && a[i][j+2]==' ' && a[i+1][j]==' ' && a[i+1][j+1]=='|' && a[i+1][j+2]==' ' && a[i+2][j]==' ' && a[i+2][j+1]=='|' && a[i+2][j+2]==' ') fprintf(f1,"%c",'1') //printf("1");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]=='|' && a[i+1][j]=='|' && a[i+1][j+1]=='_' && a[i+1][j+2]==' ' && a[i+2][j]==' ' && a[i+2][j+1]=='_' && a[i+2][j+2]==' ') fprintf(f1,"%c",'2') //printf("2");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]==' ' && a[i+1][j+1]=='_' && a[i+1][j+2]=='|' && a[i+2][j]==' ' && a[i+2][j+1]=='_' && a[i+2][j+2]=='|') fprintf(f1,"%c",'3') //printf("3");
if (a[i][j]==' ' && a[i][j+1]==' ' && a[i][j+2]==' ' && a[i+1][j]=='|' && a[i+1][j+1]=='_' && a[i+1][j+2]=='|' && a[i+2][j]==' ' && a[i+2][j+1]==' ' && a[i+2][j+2]=='|') fprintf(f1,"%c",'4') //printf("4");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]=='|' && a[i+1][j+1]=='_' && a[i+1][j+2]==' ' && a[i+2][j]==' ' && a[i+2][j+1]=='_' && a[i+2][j+2]=='|') fprintf(f1,"%c",'5') //printf("5");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]=='|' && a[i+1][j+1]=='_' && a[i+1][j+2]==' ' && a[i+2][j]=='|' && a[i+2][j+1]=='_' && a[i+2][j+2]=='|') fprintf(f1,"%c",'6') //printf("6");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]==' ' && a[i+1][j+1]==' ' && a[i+1][j+2]=='|' && a[i+2][j]==' ' && a[i+2][j+1]==' ' && a[i+2][j+2]=='|') fprintf(f1,"%c",'7') //printf("7");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]=='|' && a[i+1][j+1]=='_' && a[i+1][j+2]=='|' && a[i+2][j]=='|' && a[i+2][j+1]=='_' && a[i+2][j+2]=='|') fprintf(f1,"%c",'8') //printf("8");
if (a[i][j]==' ' && a[i][j+1]=='_' && a[i][j+2]==' ' && a[i+1][j]=='|' && a[i+1][j+1]=='_' && a[i+1][j+2]=='|' && a[i+2][j]==' ' && a[i+2][j+1]=='_' && a[i+2][j+2]=='|') fprintf(f1,"%c",'9')//printf("9");
fclose(f);}
fclose(f1);
}
f1=fopen("output.txt","r+");
int s;
char v[9];
fscanf(f1,"%c",&v[s]);
if((v[i]+2*v[i+1]+3*v[i+2]+4*v[i+3]+5*v[i+4]+6*v[i+5]+7*v[i+6]+8*v[i+7]+9*v[i+8])%11==0){
fprintf(f1,"%c%c%c%c%c%c%c%c%c",v[i+8],v[i+7],v[i+6],v[i+5],v[i+4],v[i+3],v[i+2],v[i+1],v[i]);} else fprintf(f1,"failure");
}

this is not an exam, just a problem from my homework!

what is the next i need to do? if you want help me