3 votes
Accepted

PSet5 case-insensitive using strcasecmp

Your word comparison appears to be case insensitive. What about your hash function? Is it case sensitive? ;-) If this answers your question, please click on the check mark to accept. Let's keep ...
user avatar
  • 63.4k
2 votes
Accepted

Pset2 Readability test fail "complex single sentence" Grade 9 instead of Grade 8

What is happening there, is that you did your word count asuming that the next caracter would be alphabetical, here: al = isalpha(text[i + 1]);, but in this case, the next caracter are quotation marks ...
user avatar
  • 1,561
2 votes
Accepted

bot50 invitation on me50

I think it's just an invitation for you to be able to pass the psets. When you pass psets it should be saved to a private repository of your github the link should just be github.com/me50/YourUsername
user avatar
  • 711
2 votes
Accepted

PSET 4 Reflect help

So my swap function was switching the values of my variables but the variables themselves did not get switched so I had to write out the code to swap the variables (from what i'm told the swap ...
user avatar
1 vote

PSET 5 Hash help

You've got a few different problems. First, take a look at your first call to fopen(). You call it again to check if the result is NULL, but that's incorrect. Instead, try declaring a variable with ...
user avatar
1 vote

PSET 5 Hash help

Let's talk about how you're using the hash function first. Here's your code: hash(word) Ignoring the missing semicolon, this is a normal function call. Since hash() returns an int, the code ...
user avatar
  • 63.4k
1 vote

PSET 4 Errors: where did I go wrong?

For grayscale you should take a look to operator precedence in C (google). The result 'a + b / c' is not the same than '(a + b) / c' For reflect a question: How many swaps do you need to do to flip ...
user avatar
  • 1,561
1 vote

PSET 1 Cash two inputs don't get appropriate value

You need to read the report more carefully. Yes, 7 coins for $1.60 would be correct. But the problem is the return value that the program is sending. The spec says to print the number of coins, not ...
user avatar
  • 63.4k
1 vote

PSET 1 Cash two inputs don't get appropriate value

The problem is this line: return change; For the main() function you're supposed to return 1 if there's been an error, or 0 if succeed.
user avatar
  • 1,561
1 vote

CS50 Blur issue

I missed a += on the rgbtGreen :S
user avatar
  • 11
1 vote

pset2 readability. cannot compile although int is declared and code is complete. could someone please look into?

The variables that you create in the for loops only exist within that for loop. You can use the result of a certain iteration of a for loop by eg: including an if function within the for loop to pick ...
user avatar
  • 21
1 vote
Accepted

pset2 readability. cannot compile although int is declared and code is complete. could someone please look into?

It's a scope problem: When you declare a variable inside a 'for' loop or a function, it only will be available until the loop/function ends. For example in your for loop: for(int i=0;text[i]!='\0';i++)...
user avatar
  • 1,561
1 vote
Accepted

pset3 Runoff help

Thanks to seans help I was able to figure out the issue, here is my new code: bool vote(int voter, int rank, string name) { // iterates over candidates to see if name matches the name provided ...
user avatar
1 vote

Getting this error: invalid operands to binary expression ('int' and 'int (int)') in the below code on ps1 cash.c

In the line changeOwed = changeOwed - biggestCoin;, you subtract a function from an integer. I assume you meant changeOwed = changeOwed - biggestCoin(changeOwed) instead, subtracting the return value ...
user avatar
  • 20.7k
1 vote
Accepted

Problem Set 4 - Filter (Blur)

for (int i = 0; i < height; i++) { for (int j = 1; j < width; j++) { Your j variable here shouldn't start at 1.
user avatar
  • 302
1 vote
Accepted

2019-2020 Progression bar red beside finished

If it’s red it means you have not summited all the pset’s so you need to check which pset is marked as unfinished
user avatar
  • 418
1 vote
Accepted

PSET2 Caesar isdigit function works opposite way

isdigit(k) is testing whether the ascii value of k is in the range of 48 - 57. Those are the ascii representations of '0' through '9'; here is an ascii table for your review. But k is an integer from ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible