Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
Andreas Wenzel's user avatar
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 ...
Michal Kotus's user avatar
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 ...
Chi Go's user avatar
  • 3
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 ...
Joseph J Filoramo's user avatar
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 ...
Alvaro Barboza's user avatar
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 ...
rand_program's user avatar
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 "...
007's user avatar
  • 3
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 ...
Lakshya Dugar's user avatar
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. ...
David's user avatar
  • 11