From 6e62d69852b112277a76f8506a162fc548e36a26 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 10 Mar 2016 17:48:28 +0530 Subject: [PATCH] changed to 3 --- cpp/rot_caesar_ascii.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 +}