1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Just started programming, please help me:)

Discussion in 'C++' started by j+e, Feb 18, 2009.

Thread Status:
Not open for further replies.
  1. j+e

    j+e New Member

    Joined:
    Feb 18, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    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;
    a = a[(b-1)-i];
    a[(b-1)-i] = temp1;
    cout << a ;

    Can somebody please help me?

    Thanks!
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Duplicate of Please help me:). Thread closed. Please do not create the same thread over and over again.
     
Thread Status:
Not open for further replies.

Share This Page