Program Recpatient (input,output); (*Prg reads total coded file and reduced coded file to identify patients in red file*) var ans,c,scnum,ctr,fl,pn1,pn2,ctr2 :longint; ifil,ofil,ifil2,ifil3 :text; namei,a1,a2,a3,a4,a5,b1,b2,b3,b4,b5 :string; class :string[9]; d,e,f,g,h,i,j,sum,frac,a,b,k :real; answ :char; Begin writeln('Enter the filename of reduced patient file'); readln(namei); assign(ifil2,namei); reset(ifil2); writeln('Enter the filename of total nna file'); (*same gene # in both*) readln(namei); assign(ifil3,namei); reset(ifil3); writeln('Please enter patient # in reduced set'); readln(pn1); writeln('Please enter patient # in total set'); readln(pn2); writeln('Please enter the number of lines per patient'); readln(c); if c<5 then writeln('Cannot proceed without modification of prg'); assign(ofil,'recpat'); rewrite(ofil); k:=0; b:=0; fl:=0; ctr:=0; for ctr:=1 to pn1 do begin readln(ifil2,a1); readln(ifil2,a2); readln(ifil2,a3); readln(ifil2,a4); readln(ifil2,a5); for fl:=1 to (c-5) do readln(ifil2); for ctr2:=1 to pn2 do begin readln(ifil3,b1); readln(ifil3,b2); readln(ifil3,b3); readln(ifil3,b4); readln(ifil3,b5); for fl:=1 to (c-5) do readln(ifil3); if (a1=b1)and(a2=b2)and(a3=b3)and(a4=b4)and(a5=b5) then writeln(ofil,'patient ',ctr,' of the reduced file is patient ',ctr2); end; (*ctr2*) reset(ifil3); end; (*ctr*) close(ifil2); close(ifil3); close(ofil); end.