Questions tagged [cs50-pset2]

The tag has no usage guidance.

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

Caesar Pset2 Handles non-numeric key :(

I am tearing my hair out on this exercise. I cannot get it to pass a non-numeric key. I've played around with the code for 2 weeks now. I can either get it to handle a numeric key or handle a lack of ...
0
votes
0answers
14 views

Pset2 Substitution Duble check loop

Please help to understand why at any values of argv[1] the terminal displays "Duble." #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #...
0
votes
1answer
71 views

Segmentation fault in Substitution - Problem Set 2

I have finally finished writing my code for the Substitution question in Problem Set 2, but Check50 tells me that my code has a segmentation fault when there is a lack of key. My code is as follows: #...
0
votes
1answer
803 views

Counting words pset2 Readability

there. I am trying to complete pset2 Readability and have a doubt on counting words. Can this be an approach? int words = 0; for (int i = 0; i< n; i++) { if (isblank(text[i])) { ...
0
votes
2answers
77 views

PSET2 Vigenere: Output bug, keyword loop going over strlen of key

I am having an issue specifically with the second for loop (under "//iterate over key inputs" comment). The counter j is going over the strlen of argv[1], and thus feeding a wrong input to my shift ...
0
votes
2answers
48 views

Pset 2 - vegenere

#include <cs50.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> bool isNumber(char number[]); int main(int argc, string argv[]) { // ...
0
votes
1answer
267 views

vigenere error:expected prompt for input, found none

#include<stdio.h> #include<cs50.h> #include<string.h> int main(int argc,string argv[]) { if (argc!=2) { return 1; } else { int i=0; for (i=0;i&...
0
votes
1answer
823 views

pset2//caesar- relational operator result unused error

my code--> #include<stdio.h> #include<cs50.h> #include<string.h> #include<ctype.h> #include<stdlib.h> int main(int argc, string argv[]) { if(argc!=2) ...
0
votes
1answer
110 views

Hello, I am getting this error in Vigenere cipher (pset2), please help! [duplicate]

Please help as I am getting this unexpected error and I cant understand it.
0
votes
2answers
508 views

Getting initials from a name

I am working on pset2's initials.c where the goal is to return the initials in upper case. I figured out how to get the initials of the first name, but i am not sure how to get the second name. For ...
-2
votes
1answer
25 views

I am not sure about the error message

i was compiling my code and it gave me this error, with an arrow below the 's'. I don't understand what it means? note: to match this '(' printf("%c", toupper(s[(int)(' ')]i++));
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
2answers
102 views

PSET 2 Vigenere - problem

My code works with a Key of BBB and the letters AAA and loops properly and skips spaces, numbers, punctuation but fails the tests. With a key of baz, it turns world say hello to xpsme, tbz ifmmp and ...
0
votes
1answer
126 views

I am stuck on CS50 vigenere

Hi please see the link for the code I am working with. I think the layout is correct but cannot seem to find the correct algorithm to solve this problem. https://github.com/ionakathryn/cs50-pset2/...
0
votes
1answer
285 views

pset2 caesar alphabet loop

In light of CS50's plagiarism rules I'll do this in part psuedo code. My question lies within the for loop that iterates through the user's input to translate it into Caesar's cipher. For some reason, ...
0
votes
2answers
74 views

cs50 pset 2 Vigenere error with the CAPS of the keyword

what's up? I'm having an issue debugging this code. So for I have been working on Vigenere 2 days (-school time) and works great except for keywords with capitalized letters like BaZ, BAR... I'm ...