+ 14
Error in code coach
I am stuck in "average word length" code coach problem I am getting output '4' in 1st test case but the expected output is '3' Why this happens I can't understand and all the other test cases are giving right output 1st test case string: "Can you not do that?" Expected output : 3 My output : 4 Please help https://code.sololearn.com/c9y53Tg5vfjC/?ref=app
5 Antworten
+ 8
Piyush Thourani there are many ways if u want a easy way then u can an if statement
(ch>64 && ch<91)||(ch>96 && ch<123)
Like this here special characters and numbers are not included
there's a short method too...
String[] n = sc.nextLine().replaceAll("[^a-zA-Z .]", "").split(" ");
+ 7
Thanku so much 😁
+ 4
You didn't remove all punctuation from the input first.
+ 3
ChaoticDawg
How can I remove punctuation please explain
- 1
ظاسقمشبننشبذبنؤنننءب