This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| string getKeyword() { | |
| cout << "please enter your keyword: "; | |
| while (true) { | |
| // get input from user | |
| string user_input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int getValidKey() { | |
| // print message to user | |
| cout << "please enter your key: "; | |
| // a variable to store the result | |
| int result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| // a function to get a number input from user | |
| // message: a message to show to user | |
| // def: a default value for number | |
| // a: if a > 0, this means that we're current asking for parameter c | |
| // which we need to verify that a*c % 26 == 0, |