Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. program Panzerhound;
  2. var Adress,Mask,Cnv,Res:string; i,IntCnv,IntRes:integer;
  3. begin
  4. readln(Adress);
  5. readln(Mask);
  6. Adress:=Adress+'.';
  7. Mask:=Mask+'.';
  8. for i:=1 to 4 do begin
  9. Cnv:=copy(Adress,1,pos('.',Adress)-1);
  10. delete(Adress,0,pos('.',Adress));
  11. Res:=copy(Mask,1,pos('.',Mask)-1);
  12. delete(Mask,0,pos('.',Mask));
  13. val(Cnv,IntCnv,i);
  14. val(Res,IntRes,i);
  15. str((IntCnv and IntRes),Cnv);
  16. Adress:=Adress+Cnv+'.';
  17. end;
  18. writeln(Adress)
  19. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement