diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0cba2e6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "iostream": "cpp" + } +} \ No newline at end of file diff --git a/Projects/C++ Projects/Basic/CPP Magic Text/text.cpp b/Projects/C++ Projects/Basic/CPP Magic Text/text.cpp index 15e4a4b..077af52 100644 --- a/Projects/C++ Projects/Basic/CPP Magic Text/text.cpp +++ b/Projects/C++ Projects/Basic/CPP Magic Text/text.cpp @@ -5,10 +5,9 @@ int main() char str[100]; - cout<<"Enter some text or numbers and see magic:-"< +using namespace std; + +int main() +{ + int i, x; + char str[100]; + + cout << "Please enter a string:\t"; + cin >> str; + + cout << "\nPlease choose following options:\n"; + cout << "1 = Encrypt the string.\n"; + cout << "2 = Decrypt the string.\n"; + cin >> x; + + //using switch case statements + switch(x) + { + //first case for encrypting a string + case 1: + for(i = 0; (i < 100 && str[i] != '\0'); i++) + str[i] = str[i] + 2; //the key for encryption is 3 that is added to ASCII value + + cout << "\nEncrypted string: " << str << endl; + break; + + //second case for decrypting a string + case 2: + for(i = 0; (i < 100 && str[i] != '\0'); i++) + str[i] = str[i] - 2; //the key for encryption is 3 that is subtracted to ASCII value + + cout << "\nDecrypted string: " << str << endl; + break; + + default: + cout << "\nInvalid Input !!!\n"; + } + return 0; +} diff --git a/Projects/C++ Projects/Basic/Encryption and Decryption of Text/tempCodeRunnerFile.exe b/Projects/C++ Projects/Basic/Encryption and Decryption of Text/tempCodeRunnerFile.exe new file mode 100644 index 0000000..c588c40 Binary files /dev/null and b/Projects/C++ Projects/Basic/Encryption and Decryption of Text/tempCodeRunnerFile.exe differ diff --git a/Projects/C++ Projects/Basic/Temperature-calculator/temperature-calculator.exe b/Projects/C++ Projects/Basic/Temperature-calculator/temperature-calculator.exe index 82394da..c5fc2f3 100644 Binary files a/Projects/C++ Projects/Basic/Temperature-calculator/temperature-calculator.exe and b/Projects/C++ Projects/Basic/Temperature-calculator/temperature-calculator.exe differ diff --git a/README.md b/README.md index 75e037f..1b32fd7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ + +``` +## NOTICE + +- I have lost access to my old GitHub account [@TYP-1] (https://github.com/The-Young-Programmer)). + +- All updates for this project will now be managed here under this new account [@TYP-2] (https://github.com/The-Young-Programer). + +- Please submit all stars, issues, and pull requests here in this repository. + +Thank you for your understanding! + +``` + + + + + +