6char encryption(
int key1,
int key2,
char letter);
7char decryption(
int key1,
int key2,
char letter);
23 cin >> mode >> key1 >> key2;
27 input.push_back(character);
28 if (character ==
'!'){
37 for (
int i=0; i < input.length(); i++){
48 for (
int i=0; i < input.length(); i++){
66 letter = abs((letter*key1+key2) % 26);
90 if (
gcd(key1, 26) == 1){
94 int y = mmi_of_a*(letter-key2) % 26;
100 letter = letter + 97;
103 letter = letter + 65;
115 for (
int i = 65+change_case; i < 91+change_case; i++){
116 if (
encryption(key1, key2, (
char)i) == letter){
128 for (
int i = 1; i <= mod_value; i++){
129 if (abs(a*i % mod_value) == 1){
141 if ((
int)letter >= 97){
143 letter = ((int)letter - 32);
145 letter = (int)letter - 65;
149 if (((
int)test >= 65) && ((
int)test <= 90) || ((
int)test >= 97) && ((
int)test <= 122)){
char encryption(int key1, int key2, char letter)
char decryption(int key1, int key2, char letter)
void convert_position_alphabet(char &letter)
bool check_within_a_z(char test)
int find_mmi(int a, int mod_value)
string upper_case(string str)