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

Previous line in C / Matrix

Discussion in 'C' started by somali.cc, Sep 30, 2010.

  1. somali.cc

    somali.cc New Member

    Joined:
    Aug 23, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Hello frnds,

    By using the command printf("\n"); we can go to next line.

    BUt how to print an output in previous line ??

    Like, I want 2 matrices to be printed as follows :

    A= 1 2 B= 5 6
    3 4 7 8


    Every time I am getting the output as:

    A= 1 2
    3 4 B= 5 6
    7 8
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    You have to print 1 2 and 5 6 before printing "\n"
     
  3. somali.cc

    somali.cc New Member

    Joined:
    Aug 23, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Thanx Shabbir. I wl try dat
     

Share This Page