You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/KApgpiqqX20
#include <bits/stdc++.h> using namespace std; int main() { string s; int cipher; cin >> cipher; cin >> s; cin >> cipher; for(char &c:s) { if(isalpha(c)){ char a = isupper(c)? 'A':'a'; c = a + (c - a + cipher) % 26; } } cout << s ; return 0; }
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 →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/KApgpiqqX20