0

So my code is working, but when I check, this error appears on all criphertexts. error

string plaintext = get_string("plaintext: ");

printf("criphertext: ");

for (int i = 0, len = strlen(plaintext); i < len; i++)
{
    char c = plaintext[i];

    if (isalpha(c))
    {
        char m = 'A';

        if (islower(c))
            m = 'a';
            printf("%c", (c - m + x) % 26 + m);
    }
    else
    {
        printf("%c", c);
    }
}
printf("\n");
0

Your code is nice and clean.

This is just a small spelling error that seems to be in your question too. "criphertext"

1
  • Thanks I didn't see that :) I was thinking that my problem was on the code... you help me a lot – Victória Ester Sep 10 '20 at 19:43
0

See anything wrong here? ;-)

         printf("criphertext: ");
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .