Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
In your division of charcount by words, both are int. You have to convert one of them to double, to keep the precision places.
19th May 2020, 6:33 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar
0
I saw it. But that is not enough. double x = 5 / 2 --> 2.0 double x = 5.0 / 2 --> 2.5
19th May 2020, 6:37 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar
0
You have to init count with 1 ("abc def", one space, but two words). Also you have to make input lower-case or check upper-case letters.
19th May 2020, 6:45 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar