New answers tagged

0

int letters, words, sentences(string text) is not the correct function declaration, which is why your program won't compile. You will need to correct this by having only one return type, one single-word function name, and a single parameter list (if required). So, int letters(string text), int words(string text), and int sentences(string text) would be ...


0

Simple typographical error. Order of magnitude off for the calculations.


0

One of the hidden lessons of this pset is to teach the impact of integers and floats on calculations. Look at the following code: float l = (100 * n_let) / n_words; Each of the 3 numbers involved in the calculation is an int. Since all of them are integers, this code is performing integer division, not regular division. (It's not the only place.) This is ...


Top 50 recent answers are included