Mailing Labels - Breaking into two columns on output file layout

Discussion in 'C++' started by Prosdo, Nov 10, 2007.

  1. Prosdo

    Prosdo New Member

    Joined:
    Nov 7, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone. I am very new to C++ and taking a class. I have a program due on Monday and I ran into a wall. The programs calls for us to make mailing labels. They must be in this format:

    Michael Smith
    555 Lincoln Way
    Philadelphia, PA 24211
    Box 1 of 5

    The odd labels must be on the left and the even on the right they should be sent to the output file in the layout

    LABEL1 LABEL 2
    LABEL 3 LABEL 4
    LABEL 5

    So I need them to enter the number of boxes and it should count up to the number they need. I figured for that I would need something like number = number + 1. We can use loops, but I am not to sure with those. Here is the code I have so far:

    My teacher said I would need the modulus operator to split the sides of the mailing list? Can anyone help? Also do I need to use a loop for this? Thanks guys
     

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