Questions tagged [caeser]
The caeser tag has no usage guidance.
9
questions
2
votes
1
answer
11k
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 <...
1
vote
2
answers
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]; ...
1
vote
1
answer
21
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 ...
0
votes
2
answers
91
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
1
answer
34
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
1
answer
101
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
1
answer
39
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
1
answer
27
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 (...
0
votes
1
answer
163
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 ...