Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROCEDURE Hash(elem: InfoTip) : CARDINAL;
- VAR i, rez, duzina: CARDINAL;
- BEGIN
- rez:=0;
- duzina := Length(elem.prezime);
- FOR i:=1 TO duzina DO
- rez := rez + ((ORD(elem.prezime[i])*ORD(elem.prezime[i])*ORD(elem.prezime[i])));
- IF rez < 600 THEN
- rez := rez MOD 439;
- ELSIF rez > 600 THEN
- rez := rez MOD 521;
- END;
- END;
- rez := rez + elem.soba;
- RETURN rez MOD VelicinaTabele;
- END Hash;
- // http://www.dodaj.rs/f/3O/JO/3qkEi3Wf/kanc-ord3-if.jpg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement