Guest User

Untitled

a guest
Jun 13th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. }else{
  2. if((int)msg[i] + actualShift > 122){ // check if it needs to wrap
  3.  
  4. int wrapShift = actualShift - (122 -(int)msg[i]);
  5. msg[i] = (char)(96 + wrapShift);
  6.  
  7. }else
  8. msg[i] = (char)((int)msg[i] + actualShift);
  9.  
  10. }
Add Comment
Please, Sign In to add comment