Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Panzerhound;
- var Adress,Mask,Cnv,Res:string; i,IntCnv,IntRes:integer;
- begin
- readln(Adress);
- readln(Mask);
- Adress:=Adress+'.';
- Mask:=Mask+'.';
- for i:=1 to 4 do begin
- Cnv:=copy(Adress,1,pos('.',Adress)-1);
- delete(Adress,0,pos('.',Adress));
- Res:=copy(Mask,1,pos('.',Mask)-1);
- delete(Mask,0,pos('.',Mask));
- val(Cnv,IntCnv,i);
- val(Res,IntRes,i);
- str((IntCnv and IntRes),Cnv);
- Adress:=Adress+Cnv+'.';
- end;
- writeln(Adress)
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement