Program ChipDAT (input,output); (*Prg reads (red)gset chip data array & makes nw outfile *) Uses WinCRT; var ans,k,b,c,scnum,ctr,ct :integer; ifil,ofil :text; namei,class :string; d,e,f,g,h,i,j,sum,frac,a :real; answ,answp :char; Begin { writeln('Enter the filename'); readln(namei);} namei:='O:\400proj\X'; assign(ifil,namei); reset(ifil); assign(ofil,'X.nna'); rewrite(ofil); k:=0; b:=0; (* Writeln('How many patients are there?'); readln(ans);*) ans:=53; for c:=1 to ans do BEGIN for ct:=1 to 398 do begin for ctr:=1 to b do read(ifil,a); readln(ifil,a); (* readln(ifil);*) k:=succ(k); if k mod 5 =0 then begin writeln(ofil); write(ofil,'&'); end; if (a<0.33) then write(ofil,' 0 0 1 0') else if (a<=1.0) then write(ofil,' 0 0 0 1') else if (a>3.0) then write(ofil,' 1 0 0 0') else write(ofil,' 0 1 0 0'); end;(*ct=*) writeln(ofil); write(ofil,'& '); b:=succ(b); { writeln('Is patient #',b,' diseased? YorN'); readln(answ); answ:=upcase(answ); if answ='Y'then begin writeln('metastatic?'); readln(answp); end else} if (b in [1..18])or (b=53) then writeln(ofil,'0.0 0.0 1.0'); if b in [19..32] then { answp:=upcase(answp); if ((answ='Y') and (answp='Y')) then} writeln(ofil, '0.0 1.0 0.0'); { if ((answ='Y') and (answp='N')) then} if b in [33..52] then writeln(ofil,'1.0 0.0 0.0'); reset(ifil); k:=0; END;(*FOR 1 to ans*) close(ifil); close(ofil); end.