Questions tagged [pset2-caesar]

The tag has no usage guidance.

18 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

Caesar scoping. variable len not defined, yet it works

The code is following: #include <stdio.h> #include <cs50.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <ctype.h> bool key_validity(string s)...
0
votes
1answer
34 views

pset2 mathematical IF statement : attempt

#include <stdio.h> #include <string.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <cs50.h> int main ( int argc, ...
0
votes
1answer
27 views

i m getting segmentation fault in my code for cs50 caesar

#include <stdio.h> #include <cs50.h> #include <stdlib.h> #include <ctype.h> #include <string.h> int main(int argc, string argv[]) { //getting correct input for KEY ...
0
votes
2answers
51 views

PSet2 Caesar - User Defined Function Issue

I'm a newbie with what seems to be a syntax issue in my user defined function. Currently my code --and the error is the following: ...the problem seems to be the semicolon at the end of line 39. But ...
0
votes
2answers
42 views

How to invoke command line argument functions outside of main? caesar.c

Let us say I want to create a separate function for lines 11-25 (check comment for reference) in my code as a separate "argument checker" function. Something similar to how I have my decrypt ...
0
votes
1answer
68 views

I got my code to work but it doesnot meet the requirements

:( handles non-numeric key timed out while waiting for program to exit the program: #include <stdio.h> #include <cs50.h> #include <stdlib.h> #include <ctype.h> #include &...
0
votes
0answers
33 views

caesa cypherr cs50 pset2

I am having some issues with my code, clang continues to say use of a undeclared identifier when I have identified the variable that I would like to use. Can some one help me with this issue. My code ...
0
votes
0answers
57 views

Need help for submitting caesar.c?

Hello guys, when I check my code manually it seems ok and here it is : #include <stdio.h> #include <cs50.h> #include <ctype.h> #include <stdlib.h> #include <string.h> ...
0
votes
1answer
679 views

problem set 2 caesar check :( handles non-numeric key timed out while waiting for program to exit

I have gotten my code to work for the caesar problem in problem set 2. However, when i check through check50 I run into this error: :( handles non-numeric key timed out while waiting for program ...
0
votes
1answer
65 views

Why doesn't my Caesar code not return an output for the cipher text?

Can anyone help me out why my code won't return any cipher text, think it has something to do with the formula ci = (pi + k) % 26 I have done. Any help much appreciated. // Libraries #include <...
0
votes
1answer
351 views

pset2 - Cipher - Invalid Slug

I'm struggling to check50/submit50 for the caeser cipher wk2 pset for CS50. Can anyone please advise what mistake I'm making? Code as linked: https://pastebin.com/5B7tcaGg I'm attempting to use; ...
0
votes
1answer
100 views

My solution to Pset2's Caesar works but I only got 40% on it. Why?

I worked my way through Caesar as well as Vignere in PSet2. I got a score of 99% for Vignere but only 40% on Caesar, which is really strange as I worked off of Caesar for Vigenere.. If anyone could ...
0
votes
1answer
156 views

Validating the key in PSET2 caesar?

int main( int argc, string argv[]) { if(argc ==2) { for(int i = 0, n = strlen(argv[i]); i < n; i++) { if(isdigit(argv[1][i])) { ...
0
votes
1answer
115 views

pset 2 caesar problems with if/else code, debug50 and help50 aren't working

I wrote my solution to pset2 caesar and it compiles and behaves as expected but doesn't pass the check50 test. Error is as follows: :) caesar.c exists. :) caesar.c compiles. :) encrypts "a" as "b" ...
0
votes
1answer
57 views

cs50 pset2 Caesar - Help doesn't compile

#include <cs50.h> #include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int main(int argc, string argv[]) { // check for correct arguments ...
0
votes
1answer
40 views

pset2 caesar, I really dont know, its printing the first capital twice?

im stuck now, I cant see it. Its all working and ciphers correctly, but whenever the first index of plaintext is a capital, it seems to print it twice? I have gone through it line by line for ages ...
-1
votes
1answer
73 views

issue with check50 in pset2 caesar

This is my code https://pastebin.com/1uephEEh for cs50 pset2 caesar I am not able to find the problem I am getting correct output but somehow I am unable to pass the check50. If anyone could help me ...
-1
votes
1answer
48 views

Code passes check50 and style50, but just doesn't look right

This code passes both the cs50 check50 test and the cs50 style50 test. However, something just doesn't look right. Any help or suggestions will be greatly appreciated. Specifically, the seventh line ...