Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Just started programming, please help me:) (http://www.go4expert.com/forums/started-programming-help-t16252/)

j+e 18Feb2009 16:46

Just started programming, please help me:)
 
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!

shabbir 18Feb2009 18:50

Re: Just started programming, please help me:)
 
Duplicate of Please help me:). Thread closed. Please do not create the same thread over and over again.


All times are GMT +5.5. The time now is 20:17.