0

Hi all i'm currently facing problems when it comes to encrypting keywords with capital letters in it. I have checked my code on check50. but it still fails when entering keyword like Baz and BAZ with capital letter as the keyword. All the other requirements are correct as of i've checked.

My expected output when it encrypts BaRFOO and BARFOO but instead it becames some gibberish "C=aQKGAonh\n" , "C=A;QKGAO/NH\n"

I know theres something wrong with my algorithm but i can't seem figure out where. Someone please help!:(

Academic Honesty


i have manage to solve my find the problem of my code. What i did was to comment out all the else if & else condition which make it work. However I'm still curious to know why i am not allowed to enter conditions in my else & else if statements.

If I'm allowed to have the same is isalpha(), isupper() , islower() conditions in my if statements E.G if(isalpha(message[i])), if(isupper(message[i])), if(slower(message[i])) why can't i put the opposite condition in my else statements.

Removed code

0

I see there is an extra %26 when both the key and the message are uppercase. I might be wrong, but shouldn't there be only one?

| improve this answer | |
  • Sorry the extra %26 is not suppose to be there . – zhun Oct 30 '15 at 12:34

You must log in to answer this question.

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