问题描述
嗨eveyone。我是C ++的新手并且有一个任务即将发布。除了两个部分,我理解其中的大部分内容。 For循环和输出文件中的布局。作业是邮寄标签。它们将采用以下格式:
迈克尔史密斯
555史密斯街
费城,宾夕法尼亚州15728
方框1 5美元
老师希望他们打印
BOX 1 BOX2
BOX 3 BOX 4
BOX5
如何分割这样的页面并强制程序以这种方式打印它们。也是for循环我有点不确定如何把它放在一起。任何人都可以解释一下for循环吗?多谢你们。您可以提供任何帮助。
Hi eveyone. I am very new to C++ and have an assignment coming up. I understand most of it except for two parts. The For Loop and the layout in the output file. The assignment is to do mailing labels. They will be in the format:
Michael Smith
555 Smith Street
Philadelphia, PA 15728
Box 1 of 5
The teacher wants them to be printed
BOX 1 BOX2
BOX 3 BOX 4
BOX5
How would I go about splitting the page like that and forcing the program to print them that way. Also the for loop I am a bit uncertain of how to put it together. Can anyone maybe explain the for loop a little? Thanks guys. Any help you can provide would be so appreciated.
推荐答案
这篇关于C ++新手/输出文件布局/ For循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!