Questions tagged [vigenere.c]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

In pset2, Vigenere, I made and used an array that I would like for it to be explained

I’ve successfully solved Caesar and Vigenere pset but made and used an array that I stumbled upon through trial and error but don’t exactly know why and how it worked. I’m hoping someone could clarify ...
0
votes
1answer
23 views

I have multiple issues with my code

after rewriting my code again i faced some proplems, when i compile it with 'a' or other key it's not printing anything, and i'm checking if user not providing plaintext it should print messege but it ...
0
votes
1answer
40 views

what's wrong here? i get an segmentation fault error and am i at the right direction?

int keyvalue = 0; int n = strlen(argv[1]); char cipher; for (int i = 0; i < n; i++) { keyvalue++; } for (int i = 0, s = strlen(...
0
votes
1answer
33 views

Vigenère spitting out random strings

My vigenère is spitting out random strings. For example, here is a test I got from my terminal ~/pset2/ $ ./vigenere a plaintext: a ciphertext: G ~/pset2/ $ And my code is here. I suspect that ...
0
votes
1answer
432 views

CS50 pset2 vigenere problem getting the shift

Problem with the shift value function ## Hi, Could anyone please take a look at the code below and help me figure out where it goes wrong. I think the problem is with the shift_value. The code ...
0
votes
1answer
145 views

vigenere pset2 spaces

I'm having issues figuring out how to ignore the spaces in the user string when changing to ciphertext. I thought the isalpha() check accounted for that but I guess not. Any help would be ...
0
votes
1answer
51 views

Vigenere Cipher Printing Problem

I am wondering what this code is doing wrong when I run the keyword, "illuminatti," and the plaintext, "Magick is the key". I should get the ciphertext, "Ulrcos vs mam spj". I instead get the ...
0
votes
1answer
53 views

Problem about vigenere.c

https://pastebin.com/Quzkj9FT I have finished the first case : both plaintext and key are isupper.(The Link) However, I got some problems when doing either one of them is islower. Can anyone give me ...
1
vote
1answer
19 views

Vigenere.c has some problem in accepting alpabetic as a key

when i give an input of ./vigenere abc it doesn't accept and its printing key must be alphabetic.where have i gone wrong.would anyone explain in brief? and how do i correct it? Please help me out.! ...
0
votes
1answer
34 views

not satisfying the condition for input

In command line argument,it should not accept argv[1] as a numeric or any other.It should accept only alphabetic and that argv[1] is treated as key which is to be added with plaintext.so,for that i ...
0
votes
1answer
83 views

Pset3 help : vigenere error

I have this error. Please Help ~/workspace/pset2/ $ make vigenere clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow ...
0
votes
1answer
52 views

Vigenere unexpected output after length of key

I feel like I'm pretty close with this one, but I can't find where the wraparound is messing up. Any idea where I'm going wrong? Expected: $ ./vigenere ABC plaintext: HELLO ciphertext: HFNLP Actual:...
0
votes
1answer
53 views

Vigenere can't get correct output from key

I'm working on at least getting the key to apply the first go-around, then I will worry about how to wrap around the key. I'm outputting integers in the alphabetical index to keep it simpler. Here is ...
0
votes
1answer
713 views

vigenere and space character

Pls help me. My code: https://gist.github.com/morozded/774d9d3c4575efee661d6b21290b0b97 Result my code: ~/workspace/pset2/vegnere/ $ ./vigenere bacon plaintext: Meet me at the park at eleven am ...
0
votes
1answer
97 views

vigenere.c done incorrectly, or check50 broken? [duplicate]

I completed vigenere.c per the spec for pset2, and it seems to be working fine. However, when I use check50, this is the result I get. So it says everything is fine, however when it checks how the ...
0
votes
0answers
100 views

Vigenere - is there a simpler logic behind it?

My code for vigenere.c works for check50, but ends up being much longer than caesar.c in the encipher part.I was wondering if I was missing a simple point and have meandered through the logic behind ...
0
votes
1answer
77 views

CS50 Vigenere code gives incorrect when detecting a non-alphabet char for plaintext

My vigenere code works fine when a single char or string is entered, however as soon as it detects a space in plaintext it gives wonky values. Please help! #include <cs50.h> #include <stdio....
0
votes
1answer
59 views

Having problem with vigenere in cs50. Keeps returning segmentation error, even though I solved all the errors compiler pointed out

#include <cs50.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> char argument_upper (int key, char plaintext); char argument_lower (int ...
0
votes
1answer
295 views

Pset2 Vigenere very close but errors on Check50

this was very useful last time when I was struggling with an unseen error. I'm just after a nudge in the right direction again, My code compiles and passes most of the check50 tests bar a few, the ...
0
votes
1answer
75 views

Please correct my mistakes in my vigenere code

Here's my code. I get lot's of errors from the compiler. Can you simply fix explicit errors that I made? So that I am on the right track and then I can keep fixing. #include <cs50.h> #include &...
0
votes
1answer
84 views

vigenere.c unknown problem / am I an idiot?

Right gentlemen. I've been really bad doing vigenere.c, doing it for 3 days in a row, I've finally made it and it passes check50 tests, but! I've 2 almost the same codes, one which should work, but it ...
0
votes
1answer
21 views

Pset2 - Receiving different outputs each time I run my code- Vigenere.c

I'm working on Vigenere.c, and while my code seems to be mostly correct, I keep having very strange outputs which are not even the same every time I run the program (e.g. If I run my code one time ...
0
votes
1answer
37 views

pset2 vigenere.c question.. everythint passes except BaRFoo to BaZ

This is my first time posting on here so bare with me. Having a little trouble with pset2 vigenere.c. I've been looking through the forums looking at all the questions pertaining to my question, but ...
0
votes
1answer
71 views

Trouble with pset2 vigenere

Can't figure out what I am doing wrong here. I am guessing it has to do with the way I am incrementing through the keyword. Sample below: firecore@ide50:~/workspace/pset2 $ ./vigenere abcdefghijk &...
0
votes
1answer
22 views

Pset2 vigenere key verification problems

Hey to check that the user is entering just alpha I have it set as: If (!isalpha(argv[1])) && (argc != 2) { Yell at user } The argc check works fine on its own. The isalpha check returns a ...
0
votes
2answers
63 views

Vigenere compiles but doesn't ask for input?

I'm really struggling with this pset. I know my code isn't 100% right yet but I compiled it to test it out and it eventually compiled without errors. But the problem I'm having is that it's testing ...
0
votes
1answer
133 views

Pset2 Vigenere Cipher error

I'm solving the Vigenere Cipher of Pset2, but when I compile the program, it shows an error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat] I am not sure ...
0
votes
1answer
33 views

bad access error or segmentation fault on Vigenere

I am following along the cs50 course using Xcode and I have vigenere almost working except it only lets me input 28 characters for the message, beyond that I get "exc bad access" error in Xcode or ...
0
votes
1answer
94 views

Problem Set 2: Vigenere's Cipher

I implemented the check50 to check the correctness of my vigenere's cipher program and received the following prompt: :( rejects "Hax0r2" as keyword \ expected output, not a prompt for input What ...
0
votes
1answer
102 views

pset2. need help on vigenere.c code

Help me please with a problem on coding vigenere.c. The problem is with figuring out the correct code for using the key-formula on the plaintext. I think that i've found out the correct formula for ...
0
votes
1answer
105 views

Why is my Vigenere cypher not processing my keyword correctly?

I have included the part of my cypher responsilble for converting a command line keyword into an array of integers that will indicate by how much each character in a phrase should be shifted in ...
0
votes
2answers
89 views

Vigenere code has Segmentation error

I've been working on the vigenere.c problem from pset2 and am struggling to find the error in my code currently because whenever I try to run it my code crashes. Clearly there is something wrong but I ...