Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 1707

Vigenere Cipher, one of the assignments in Problem Set 2. It's like Caesar Cipher, but with a twist.

2 votes

Why does my Vigenere solution give the wrong output only at certain positions in the string?

There are a few subtle problems here. I'm not going to give you the answer directly, but I can give you some hints. Tip #1: Look at the line of output from check50 relating to the error: encrypts "wor …
Luke Van In's user avatar
  • 2,655
0 votes

Vigerenere.c not shifting correctly

Check the order of operations: (encrypt[i] - 65) + (key[ind] - 65) % 26) + 65 The modulo % operator is equivalent to a division operation, which means it is being evaluated before the addition oper …
Luke Van In's user avatar
  • 2,655
2 votes
Accepted

Vigenere problem with Check50!

clang -o vigenere vigenere.c -lcs50 -lm. ✔ 1 Expecting an exit code of 0. ✔ 2 Running... . … /vigenere a. ✔ This is telling you that check50 ran your program vigenere, passing the argument a. …
Luke Van In's user avatar
  • 2,655