#include
#include
#include
#include
using namespace std;
class cypher_en...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 30.03.2021 16:00 wednesdayA
#include
#include
#include
#include
using namespace std;
class cypher_encryptor
{
string cypher;
public:
cypher_encryptor(string cypher)
{
this->cypher = cypher;
}
string encode(string original)
{
string result = original;
for (int i = 0; i < original. length(); i++)
{
if (original[i] == ' ') continue;
result[i] = cypher[original[i] - 'a'];
}
return result;
}
string decode(string secret)
{
string result = secret;
for (int i = 0; i < secret. length(); i++)
{
if (secret[i] == ' ') continue;
for (int j = 0; j <= 26; j++)
{
if (cypher[j] == secret[i])
{
result[i] = j + 'a';
}
}
}
return result;
}
};
class hacker
{
//Returns for each character the number of times it appears in the string
map* count_letters(string phrase)
{
// Your code starts here
// Your code ends here
}
//Returns for each count the characters that appears that number of times in the string
map>* by_counts(map counts)
{
// Your code starts here
// Your code ends here
}
public:
//Calculates the cypher using phrase as a reference and encoded
string get_cypher(string phrase, string encoded)
{
// Your code starts here
// Your code ends here
}
};
//After
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 13:20
Arectangular room is 4 meters longer than it is wide and its preimeter is 32 meters find the dimensions of the room
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 16:00
Answer me pls is an algorithm that has been coded into something that can be run by a machine.
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 22:00
You should try to photograph people on bright sunny days because the light will be best a) true b) false
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
History, 17.09.2019 09:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 17.09.2019 09:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.09.2019 09:30
![question](/tpl/images/cats/en.png)
English, 17.09.2019 09:30
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/istoriya.png)
History, 17.09.2019 09:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 17.09.2019 09:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 17.09.2019 09:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.09.2019 09:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.09.2019 09:30
![question](/tpl/images/cats/mat.png)
Mathematics, 17.09.2019 09:30