0

How to count the ASCII sum of the first word in a string

Hello guys! How can I count the ASCII sum of the first word in a string before the whitespace? For example, if I input Martin Smith I want my program to count the ASCII sum of the word Martin.

29th Apr 2019, 8:52 PM
MargaritaK
9 Answers
+ 1
~ swim ~ thank you for answering, if it's a 2d array after the i-loop shall I put a j-loop for the columns as well?
29th Apr 2019, 9:27 PM
MargaritaK
+ 1
~ swim ~ yes exactly my strings are stored like this and also is isspace(arr[i][j]) going to be a loop including an if statement checking if each of the character is a space?
29th Apr 2019, 9:38 PM
MargaritaK
+ 1
~ swim ~ i see, thank you very much!!
29th Apr 2019, 9:49 PM
MargaritaK
+ 1
Anna thank you very much!!
30th Apr 2019, 7:51 AM
MargaritaK