Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program Drugi (input,output);
- var ulaz:text;
- a,b:array[1..10] of integer;
- k,j,n,i:integer;
- broj,t,s:String[20];
- znak:char;
- c,jeste:boolean;
- begin
- assign(ulaz,'kvarovi.txt');
- reset(ulaz);
- writeln(output,'unesi simptome');
- readln(input,n);
- for i:=1 to n do readln(input,a[i]);
- while not eof(ulaz) do
- begin
- for i:=1 to 10 do b[i]:=0;
- s:='';
- read(ulaz,znak);
- while znak<> ' ' do
- begin
- s:=s+znak;
- read(ulaz,znak);
- end;
- i:=1;
- readln(ulaz,t);
- //
- k:=pos(' ',t);
- while k <> 0 do
- begin
- broj:=copy(t,1,k-1);
- Val(broj,b[i]);
- delete(t,1,k);
- i:=i+1;
- k:=pos(' ',t);
- end;
- Val(t,b[i]);
- //
- jeste:=true;
- for k:=1 to n do
- begin
- j:=1;
- c:=false;
- while (j<=i) and (not c) do
- begin
- if a[k]=b[j] then c:=true;
- j:=j+1;
- end;
- if not c then jeste:=false;
- end;
- if jeste then writeln(output,s);
- end;
- readln();
- end.
Add Comment
Please, Sign In to add comment