Questions tagged [problemset2]
The problemset2 tag has no usage guidance.
8 questions
0
votes
1
answer
46
views
Indexing problem
when debugging, the inner-most if condition never entered.
Whether the char is upper-text or lower text.
I 'm using the same methodology in both cases.
// testing if the char upper text
if ...
0
votes
1
answer
29
views
Why is it that I keep getting segmentation fault? (Problem set 2 - Caesar)
#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
1
answer
25
views
Readability for CS50 returning “Nan” value
I am fairly new to coding and im trying to complete Readability in Problem Set 2. I have coded how to count the letters, words, and sentences but now I am trying to make it calculate the grade level ...
0
votes
1
answer
180
views
Caesar problem: Validating keys
I don't really know what went wrong here.
I'm trying to test if the second word of the command line contain all digit. So I tried to check every character in argv[1] with the isdigit function by ...
0
votes
1
answer
124
views
hi, i tried to solve problem set 2 substitution. it gives right output but check50 is giving errors
include
include
include
include
include
int main(int argc, string argv[])
{
if (argc != 2)
{
printf("Usage: ./caesar key\n");
return 1;
}
int k = strlen(argv[1]);
...
0
votes
1
answer
167
views
Caesar - Problem set 2 - incorrect output
include // isalpha, isupper, islower - functions needed for caesar --- c = (p + k) %26
include // Check program is ran with only 1 command line arg. Check to make sure all characters are digits.
...
0
votes
1
answer
73
views
Problem Set 2 readability check function returning false negatives
So I understand I have a math error in this code. I assume it is a rounding error which I will eventually get to. In either case, many times I do return the correct grade level but the check50 ...
0
votes
1
answer
2k
views
Get help in Pset2 Substitution
The Errors-
:) substitution.c exists
:) substitution.c compiles
:( encrypts "A" as "Z" using ZYXWVUTSRQPONMLKJIHGFEDCBA as key
output not valid ASCII text
:...