Hi! I have just started programming and I have a question for my assignment:
When the input is ABCDE, i want the Output to be EDCBA, but for some reason I cannot understand, the output i get is: EDCDE
I have written the following in my program:
for (int i = 0; i < b; i=i++)
{
char temp1 = a[i];
a[i] = a[(b-1)-i];
a[(b-1)-i] = temp1;
cout << a[i] ;
Can somebody please help me?
Thanks!
|
Go4Expert Founder
|
![]() |
| 18Feb2009,18:50 | #2 |
|
Duplicate of Please help me
. Thread closed. Please do not create the same thread over and over again.
|


