+ 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”)

1st Feb 2018, 11:09 PM
Steve Magdaleno
Steve Magdaleno - avatar
4 Answers
+ 1
Homework? What language?
1st Feb 2018, 11:41 PM
non
+ 6
This is my code to reverse the string. Without using Arrays. https://code.sololearn.com/WXy7eVU7TV6i/?ref=app
5th Feb 2018, 12:51 AM
UnknownYmous
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.
2nd Feb 2018, 1:00 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
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
2nd Feb 2018, 8:13 AM
Steve Magdaleno
Steve Magdaleno - avatar