Thread: alignment

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    19

    alignment

    How who I have my printf statement to have the numbers come out like this

    10
    50
    250
    650
    1250

    Thanks!!

    This is what I have
    printf("%d\n", k);

    10
    50
    250
    650
    1250

  2. #2
    Registered User
    Join Date
    Oct 2005
    Posts
    19
    I didn't show up right on the first one it should be to the left!!!

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    You can edit your own posts, stop starting new threads for the same thing and replying to yourself, please.
    My best code is written with the delete key.

  4. #4
    Registered User
    Join Date
    Oct 2005
    Posts
    19
    sorry...I'm new to this board...relax

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >I'm new to this board...relax
    Okay, so that only proves that you didn't bother reading the "Read this first!" sticky and the easy to spot announcements that ask you to read them before posting.
    My best code is written with the delete key.

  6. #6
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    FAQ > How do I... (Level 1) > Format output using printf() (C)
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  7. #7
    Registered User
    Join Date
    Oct 2005
    Posts
    19
    Well not everyone on this board are computer nerds...stop cutting people down....

  8. #8
    Registered User
    Join Date
    Oct 2005
    Posts
    19
    Do you do that to feel better about your self??

  9. #9
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Do you do that to feel better about your self??
    No, we do it to keep the boards topical and free of clutter so that it's easier to ask a question and get an answer quickly. While you might enjoy stroking your ego and thinking that we have something against you personally, we really couldn't care less since you're likely to get your answer and then vanish into oblivion, never to be seen or heard from again. And you'll be quickly forgotten.

    Rest assured, we see plenty of people like you who show up, make one or two posts, then take offense at some remark and start mouthing off at people who have been here for years and proven to be immensely helpful to others. So let's just skip that part and you can try to be nicer to people volunteering their free time to help you (a typical inconsiderate and lippy noob), before quzah sees you.
    My best code is written with the delete key.

  10. #10
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Hehe, I didn't know you had to be a computer nerd to read and click a button that says "Edit".

    Also, consider that you are on a programming message board. It should be understood that a person attempting to program can atleast make their way around a webpage or forum with little trouble.
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alignment tutorial needed!!
    By mynickmynick in forum C++ Programming
    Replies: 11
    Last Post: 09-12-2008, 04:41 AM
  2. Dynamic struct alignment?
    By matthew180 in forum C Programming
    Replies: 7
    Last Post: 06-15-2007, 08:34 AM
  3. memory boundry alignment with stuctures
    By ed bitwise in forum C Programming
    Replies: 3
    Last Post: 05-08-2006, 11:33 AM
  4. Ok, I'm dumb, byte alignment for the third time
    By Shadow12345 in forum C++ Programming
    Replies: 2
    Last Post: 12-30-2002, 06:19 PM
  5. trouble with printf alignment
    By hyaline in forum C Programming
    Replies: 5
    Last Post: 09-22-2001, 01:39 AM