Update columnar-transposition input validation

+ Add keyWord and message validation in columnar-transposition example
+ Add quotes around output to help show leading / trailing spaces
This commit is contained in:
2021-07-20 16:04:18 -04:00
parent c8683680dd
commit 909bf3278e
3 changed files with 25 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
// Main program loop
int main (const int argc, const char * argv[]) {
// Left some test cases I used commented out :)
// + Keywords and messages can be URLs, include spaces, symbols, numbers, etc
// Using example keyword from www.braingle.com
// + The embedded example there doesn't seem to support numbers in keywords :(
@@ -47,7 +48,7 @@ int main (const int argc, const char * argv[]) {
// Take input for encrypting a message
// result = cData.Encrypt();
std::cout << "Encrypted message: " << result << std::endl;
std::cout << "Encrypted message: \"" << result << "\"\n";
exit = true;
break;
@@ -60,7 +61,7 @@ int main (const int argc, const char * argv[]) {
// Take input for previously encrypted message to decrypt
// result = cData.Decrypt();
std::cout << "Decrypted message: " << result << std::endl;
std::cout << "Decrypted message: \"" << result << "\"\n";
exit = true;
break;