+ 2
Need help with a coding project
Program needs A. Output user prompt B. User types a free form sentence and presses ENTER PROGRAM then performs A. Redisplay sentence B. Reverse order of each word in sentence (âHello worldâ becomes âworld Helloâ) C. Alphabetically sort each word in sentence (âHello worldâ becomes âeHllo dlorWâ)
4 Answers
+ 1
Homework? What language?
+ 6
This is my code to reverse the string.
Without using Arrays.
https://code.sololearn.com/WXy7eVU7TV6i/?ref=app
0
what language?
clues:
save the string into a variable.
split the sentence string into an array of words.
reverse the array.
loop through the array.
split each word into an array of letters.
in JavaScript, you can use sort() to make every letter of every word alphabetically arranged.
0
Preferably C programming not homework just a challenge given to me by a friend but need the coding so that i may learn it and see where Iâm making my mistakes!
More for personal reference and understanding of it in general!
Thanks everyone who is helping, I appreciate the input and support!
Im currently running it on codelite and using mingw files for this