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\redgset.217'; assign(ifil,namei); reset(ifil); assign(ofil,'217del.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 9767 do begin for ctr:=1 to b do read(ifil,a); readln(ifil,a); (* readln(ifil);*) k:=succ(k); if k mod 30 =0 then begin writeln(ofil); write(ofil,'&'); end; if (a<1.0) then write(ofil,' 0') else write(ofil,' 1') end;(*ct=*) writeln(ofil); write(ofil,'& '); b:=succ(b); if (b in [1..18])or (b=53) then writeln(ofil,'0.0 0.0 1.0'); if b in [19..32] then writeln(ofil, '0.0 1.0 0.0'); 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.