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,375
    Likes Received:
    388
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice