New answers tagged


You have identified the variables correctly, but used your brackets and keywords wrongly. Inside the for loop, you open a if statement bracket but don't close. In your control_caesar_key function, you wanted to use a for loop and wrote down the condition properly, but you replace the keyword for with the keyword if. Along with that, you will be required to ...


The function atoi returns an integer. You're assigning it to a variable of type char *. Change it to int key to fix.


The primary method for uppercasing that is shown in CS50 is using the topper() function. To utilize this, you need to use #include <string.h> at the top of your file.


I think the error in your code should be in how you are calculating the average of letters and sentences per word: float averageWords = sentences / words * 100 and float averageLetters = numberOfCharacters / words * 100;. You should actually multiply letters and sentences by 100 in each formula and then divide by words.


You can't put a semicolon inside an if condition. Use || and && to add more conditions.

Top 50 recent answers are included