0

I have little bug in my program with spaces; when the user writes "world, say hello" the output is correct but without spaces.

I tried to use:

if (isblank(n))
{
 text = n + ' ';
}

but that didn't help.

4

You don't necessarily have to use isblank() here. Instead, there should be an "else" case that executes when the "ith" character of the plain text to-be-encrypted is neither an uppercase nor lowercase letter. It should look something like this:

else
{
        printf("%c", plain[i]);
}

,assuming that plain is the name of the input string from the user that has to be encrypted by your programme.

2
  • Thank you , that helps me a lot. I thought it will be a little more harder then one else, and completely forget about that :P Sep 3 '14 at 20:10
  • Cool. Vote it up if you think I answered your question sufficiently.
    – pat_krat
    Sep 3 '14 at 22:27

You must log in to answer this question.

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