From 0efb74662dd19b00369adae6ec7f128d7a70fd20 Mon Sep 17 00:00:00 2001 From: Jesr2000 <55013048+Jesr2000@users.noreply.github.com> Date: Sat, 7 Sep 2019 22:42:13 +0400 Subject: [PATCH] Add files via upload --- Decryption/Decryption.cbp | 43 ++++++++++++++++++++++++++++++++++++ Decryption/Decryption.layout | 10 +++++++++ Decryption/main.cpp | 18 +++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 Decryption/Decryption.cbp create mode 100644 Decryption/Decryption.layout create mode 100644 Decryption/main.cpp diff --git a/Decryption/Decryption.cbp b/Decryption/Decryption.cbp new file mode 100644 index 0000000..d542f8f --- /dev/null +++ b/Decryption/Decryption.cbp @@ -0,0 +1,43 @@ + + + + + + diff --git a/Decryption/Decryption.layout b/Decryption/Decryption.layout new file mode 100644 index 0000000..f9b0323 --- /dev/null +++ b/Decryption/Decryption.layout @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Decryption/main.cpp b/Decryption/main.cpp new file mode 100644 index 0000000..d8cbd3b --- /dev/null +++ b/Decryption/main.cpp @@ -0,0 +1,18 @@ +#include +#include +#include +#include + +using namespace std; + +string toBeDecrypted(string Word) +{ + string decrypted = "";//declaring empty string to store decrypted message + + for (int i = 1; i < Word.length(); i+=2)//main loop for decrypting + { + decrypted = decrypted + (char)( ( (Word[i+1] - 100) * (Word[0] - 100) ) + (Word[i] - 100)); + } + + return decrypted; +}