You are viewing a single comment's thread. Return to all comments →
int base; for(int i=0; i<s.size(); i++){ if(isalpha(s[i])){ if(islower(s[i])){ base = 'a'; }else{ base = 'A'; } s[i] = ((s[i] - base + k) % 26) + base; } } return s;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Caesar Cipher
You are viewing a single comment's thread. Return to all comments →
}