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

Mailing Labels - Breaking into two columns on output file layout

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

  1. Prosdo

    Prosdo New Member

    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