diff --git a/cpp/rot_caesar_ascii.cpp b/cpp/rot_caesar_ascii.cpp index 8545d1a..305c605 100644 --- a/cpp/rot_caesar_ascii.cpp +++ b/cpp/rot_caesar_ascii.cpp @@ -18,13 +18,13 @@ string rot(string input) { while(index != inputSize) { if(input[index] >= LOWER_A && input[index] <= LOWER_M) - input[index] = input[index] + 1; + input[index] = input[index] + 3; else if(input[index] >= LOWER_N && input[index] <= LOWER_Z) - input[index] = input[index] - 1; + input[index] = input[index] - 3; else if(input[index] >= UPPER_A && input[index] <= UPPER_M) - input[index] = input[index] + 1; + input[index] = input[index] + 7; else if(input[index] <= UPPER_N && input[index] <= UPPER_Z) - input[index] = input[index] - 1; + input[index] = input[index] - 7; index++; } @@ -41,4 +41,4 @@ int main() { cout << cypher << endl; return 0; -} \ No newline at end of file +}