Need to write C++ code for mailing label 3 across and 5 down. I'm lost... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need to write C++ code for mailing label 3 across and 5 down. I'm lost...

I need to write C++ code for return mailing label 3 across and 5 down. Im lost...

29th Feb 2020, 5:34 PM
Troy
3 Answers
+ 4
Format your strings for the three lines with extra spaces to fill to the next label. Repeat the following five times. Display the name string three times before endl. Do the same for both address lines. Repeat as many endl as needed to get to next row of labels. Best to practice on plain paper, until it appears perfect. You may need spaces before the text to get on the label or endl before the first name line. You can make it general purpose by calling a function with the string that gets the string length and add the require spaces as it gets displayed three times.
1st Mar 2020, 9:29 AM
John Wells
John Wells - avatar
+ 1
The thing with making such program is, how to align the columns, and distance between the labels, which also need to consider paper sizes. Please consider to update your question tags, as it is now - you didn't have any language tagged while your question clearly stated C++ is the relevant language. Follow this guide on posting a question, as a future reference. And good luck with that project 👍 https://www.sololearn.com/Discuss/333866/?ref=app
29th Feb 2020, 7:56 PM
Ipang
0
//This program prints return mailing labels # include <iostream> using namespace std; int main() { cout << "Troy Smith \n" << "3724 Oak Dale Dr. \n" << "Pearland, TX. 77581 \n"; system ("pause"); return 0; }
29th Feb 2020, 5:35 PM
Troy