1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,292
    Likes Received:
    365
    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