Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caesar test case suggestion #161

Open
lnevesabrantes opened this issue Jan 20, 2023 · 0 comments
Open

Caesar test case suggestion #161

lnevesabrantes opened this issue Jan 20, 2023 · 0 comments
Labels
CS50x CS50x

Comments

@lnevesabrantes
Copy link

I wrote a version of the Caesar code without the ctype library (no isdigit). It iterates over the characters in the argument and checks if they are digits using this condition:

if (argv[1][i] <= '0' || argv[1][i] >= '9')

This is wrong: it rejects 0 and 9 too. But check50 doesn't complain. Suggestion: write test cases using 0 or 9 as key.

@rongxin-liu rongxin-liu added the CS50x CS50x label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CS50x CS50x
Projects
None yet
Development

No branches or pull requests

2 participants