Questions tagged [caeser]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
3k views

Getting "non-void function does not return a value in all control paths"

I am getting this error when trying to compile the below code. "non-void function does not return a value in all control paths" #include <cs50.h> #include <stdio.h> #include <...
0
votes
1answer
26 views

Segmentation fault: Pset 2 Caeser isdigit

The log is telling me: "Segmentation fault", and after looking into it, I figured out the problem was in the "isdigit", but i don't know how to fix it, i'm here for about 2 hours ...
0
votes
1answer
50 views

PSET2 Caesar - Stuck at 'isdigit' step: Do I need to learn about pointers, or is something else going on?

Here is what I am attempting, and my errors. I am gathering that I am not grasping the "array of strings nature of argv[], and since I am following along with the material from class, I am pretty ...
0
votes
2answers
74 views

Caesar pset2 How to Reprompt user for Command Line Argument?

I have started working on Caesar and I am stuck with how to repromt user for a command line argument incase they input some wrong values. Here is the code i wrote and I can't find any apparent errors #...
0
votes
1answer
33 views

Caesar week2 CS50

I am getting non numeric timed out error when I check50 my code. I have added another check to argv to see if it is a digit or not. It still doesn't work. Can you help? #include <cs50.h> #...
0
votes
1answer
26 views

Segmentation Fault on executing caeser

#include <stdio.h> #include <cs50.h> #include <string.h> #include <stdlib.h> #include <ctype.h> int main(int argc,string argv[]) { int i,n,q,r; if (...
1
vote
2answers
31 views

Caesar question chapter2

// k is between 1 and 26 for (int i = 0, n = strlen(s); i < n; i++) { // only for capital letters if (s[i] >= 'A' && s[i] <= 'Z') int dif = 'Z' - s[i]; ...
0
votes
1answer
153 views

I need help using isupper/islower and converting ASCII to Alphabet for Caeser PSET2

Beginner coder here. I'm working my way through caeser but can't seem to understand how I would implement isupper/islower to preserve case, or change ASCII to alphabet. Here is my code so far and it ...
1
vote
1answer
20 views

Why does it shift 6 more digits than i expected in caeser chipher? pset2

The program is working but in the wrong digits. It suppose to print out "e" when the key=1 and string=a. But i don't know how come the result is "h"? Are there any problem in my constant? really ...