All Questions
Tagged with pset2-substitution cs50x
9 questions
0
votes
1
answer
35
views
Why is it not possible to print a `string` returned by this function?
In the assignments Caesar and Substitution of Problem Set 2 of the CS50 course, students often attempt to create a separate function which enciphers the plaintext and returns the ciphertext as a ...
0
votes
1
answer
21
views
I am getting different test results for the same code
I am testing my substitution.c program, but I get every time different results for the same code.
On the very 1.st time I got all good but :( does not encrypt non-alphabetical characters using ...
0
votes
1
answer
331
views
PSET2 Substitution
#include <cs50.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
int main(int argc, string argv[])
{
// Checks if there are two ...
0
votes
1
answer
57
views
pset2 substitution - handles multiple duplicate characters timeout
One last issue with my Substitution code. I keep getting the following error when I run check50:
:( handles multiple duplicate characters in key
timed out while waiting for program to exit
My solution ...
0
votes
0
answers
47
views
PSET2 SUBSTITUTION works fine ONLY if plaintext is UNDER 9 CHAR
I was approaching the end of the substitution problem of PSET2 when I hit a snag I could not solve.
I have already written the code to check the key for the various conditions they provide. My problem ...
0
votes
1
answer
35
views
Input Problem in Char 'P' PSET2 Substitution
QUESTION
When i put cipheralgorithm (which is a function that is making encryption) in comment section (/*)
everything goes perfect i can get input when i type
./substitution ...
0
votes
1
answer
27
views
Is it just me or PSET2 Correction seems to have a mistake
I ran the check50 on my pset2 Substition.c I get everything right except for 1
encrypts "This is CS50" as "Cbah ah KH50" using YUKFRNLBAVMWZteogxhcipjsqd as key
expected "...
0
votes
1
answer
19
views
Trying to do pset 2, but it doesn't even accept my input. What am I doing wrong?
#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
int check(int c, string key);
int main(int argc, string argv[])
{
int ...
0
votes
2
answers
197
views
pset 2 - Substitution - "output not valid ASCII text" error
My substitution cipher is producing the correct output on my terminal when I run the same checks. I have reviewed other responses to similar issues but wasn't able to figure out how to find my error. ...