Void main()
{
char*
perv;
char*
vtor;
int
z,x;
perv=f1prov();
vtor=f2prov();
int n=0;
int
in=0;
int
f1st=3;
int
f2st=4;
char
tmp[50];
char
F1[30][3][50];
char
F2[30][4][50];
Ifstream f1("f1.Txt");
while(!f1.eof())
{
f1.getline(tmp,sizeof(tmp)+1,';');
strncpy(F1[(in)/(f1st)][in%(f1st)],tmp,40);
if(in%(f1st)==0)
{if((in)/(f1st)>0)
{
for(int
i=0;i<sizeof(F1[in/(f1st)][in%(f1st)]);i++)
F1[(in)/(f1st)][in%(f1st)][i]=F1[(in)/(f1st)][in%(f1st)][i+1];
}
}
in++;
}
f1.close();
z=in/f1st;
in=0;
Ifstream f2("f2.Txt");
while(!f2.eof())
{
f2.getline(tmp,sizeof(tmp)+1,';');
strncpy(F2[(in)/(f2st)][in%(f2st)],tmp,40);
if(in%(f2st)==0)
{if((in)/(f2st)>0)
{
for(int
i=0;i<sizeof(F2[in/(f2st)][in%(f2st)]);i++)
F2[(in)/(f2st)][in%(f2st)][i]=F2[(in)/(f2st)][in%(f2st)][i+1];
}
}
in++;
}
f2.close();
x=in/f2st;
int
kol,buf;
char
sort[100];
cout<<"\n\n";
ofstream
f3("Rezult.txt");
kol=0;buf=0;
for(int
s=0;s<x;s++)
{
if(strcmpi(F2[s][2],"0")!=0){strncpy(sort,F2[s][2],40);}
for(int
i=0;i<x;i++)
{
for(int
j=0;j<z;j++)
{
if((strcmpi(F2[i][2],F1[j][0]))==0)
{
if((strcmpi(F2[i][2],sort))==0)
{
f3 <<
F1[j][1] <<" "<<F2[i][1]<<"
"<<F2[i][3]<<"\n";
cout <<
RU(F1[j][1])<<" "<< RU(F2[i][1])<<"
"<<RU(F2[i][3])<<"\n";
strncpy(F2[i][2],"0",40);
}
}
}
}
}
cout<<"\n\n";
f3.close;
}
20