Answer the question
In order to leave comments, you need to log in
How to make a caesar cipher encrypt data after a space?
Here is my code
void Caesar()
{
char mas[50] = { 0 };
std::cout << "slovo" << std::endl;
std::cin >> mas;
if (std::strlen(mas) != ' ')
{
for (int i = 0; i < std::strlen(mas); i++)
{
mas[i] += 3%26;
std::cout << mas[i];
}
}
else
if (std::strlen(mas) == ' ')
{
for (int i = 0; i < std::strlen(mas); i++)
{
mas[i] += 3;
std::cout << mas[i];
}
}
}
int main() {
Caesar();
_getch();
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question