Questions tagged [wraparound]
The wraparound tag has no usage guidance.
11
questions
0
votes
1
answer
76
views
Vigenère wrap around
I'm stuck on pset2 Vigenère for a couple of days now. What's left for me to do is the wrap around. A recent draft of the below program compiled and worked fine if the length of the plaintext was equal ...
0
votes
1
answer
116
views
Pset2 - Vigenere Cipher Shifting An Extra 13 Letters To The Right
My vigenere code is compiling and executing; however, despite the wrap-around functionality working, whatever I type seems to shift an extra 13 letters to the right:
Plaintext: ...
1
vote
2
answers
362
views
Pset2 - Caesar (less comfortable) wraparound problems
if (isalpha(plain[i]))
if (isupper(plain[i]))
{
printf("%c", ((plain[i]-65) + k) % 26);
}
if (islower(plain[i]))
{
printf("%c", ((plain[...
0
votes
1
answer
88
views
PSET2, Vigenere: Wraparound is not working properly
I'm having trouble to reset the j'th value to zero whenever we use all the letters of the key. This code prints a weird conglomerate of symbols smth like ( {[{Y}]}{[Y}]} ... ). Thanks for the help!
#...
0
votes
2
answers
427
views
pset2 vigenere wraparound
I can't figure out how to wrap the k[i] in the formula c[i] = (p[i] + k[i]) % 26
I know the if and else code's are different, that's to illustrate the main implications I've tried. also the printf("%...
0
votes
1
answer
73
views
Unable to make string wrap around in PSET2
I am unable to make my key wrap around. The first three letters are working, however, after those, the program stops working and outputs garbage (or really secure cipher :))
Code (Removed)
CS50Check
0
votes
1
answer
106
views
Help! Problem with key wraparound for pset2 vigenere
I'm having trouble with the wraparound function of vigenere in (pset 2). The troublesome line of code is the one below, I suspect. Would greatly appreciate any and all advice! :)
int adjustedkey = (...
0
votes
1
answer
140
views
Don't know where to start for key wraparound in vigenere pset2
First off, I've done everything for Vigenere except wraparound the code. So if I am printing something that is of equal or lesser length to the key, it works perfectly. Problem is I don't even know ...
0
votes
1
answer
283
views
Pset2 Caesar wrap around result is inexplicably incorrect
I'm feeling somewhat silly about this, but for some reason whenever the inputted message in my implementation of the caesar cipher requires a wrap around, I end up with an incorrect letter in a ...
0
votes
1
answer
214
views
pset 2 vigenere help
I have been working on vigenere for a long time now, and here is my issue. plaintext cab with a keyword of ab returns ccbbbb. so, the plaintext is enciphering correctly but the last letter is ...
0
votes
2
answers
773
views
How to wrap around the jth element in vigenere cipher efficiently?
I have seen a lot of solutions to this but still didn't found the efficient solution for wrapping around for the non-alphabet character in the text to be encrypted.
What I did was jth position (...