Hey guys! I am struggling with a problem! Can anyone help me? Write the program: main asks user for string, calls function reverse with array as argument, then main
prints reversed array.
nFunction reverse receives array, reverses it, has no value returned.
Algorithm Requirement:
Must use a for-loop, swap opposite pairs!
nFind the length of the string
nUse a for-loop, from 0 until ½ length of string
nSwap element in jth location with the element in the (length-j-1th) location
It looks to me like you pasted your teachers instructions to us.... Attempt it first and if you are still struggling, come back. We aren't going to do your homework for you.
actually i ve already started it and i really dont understand that assault from members of the forum! and for sure these are my teacher's instructions because i had to describe the problem to you.
i'm just a beginner at c++!!
and also if i wanted someone to do my hw i can pay for it and get them done but that's not what i ask for!
but it's alright! maybe another time
It's hard to know that you've done something when you don't post any code. Next time (or even now?), post the code you have so far and describe the problem you have, and you're sure to get some help!
Assault from members? Are you serious? You literally just posted your teachers exact instructions with NO code contributed from yourself and asked for help. Obviously you're asking this board to completely do your homework for you. No one even assaulted you, but at least post the code you've got so far so it looks like you're at least attempting SOMETHING.