| Lexington High School Mathematics | Math Dept. Front Page | Student Links | Family Links |
| Introduction to C++, Kevin Kelly | Kelly Front Page | C++ Course Guide | C++ Assignments | C++ Info |
Write a program that asks the user for some address information, stores this information in a structure variable, and finally outputs the information.
The user must be separately prompted for each of the following items: first name, middle initial, last name, street address, city, state, ZIP code, country, phone number, and e-mail address.
Remember that the information must be stored in a structure variable (for example, use person.phone, not just phone).
For the output section of the program, print most of the information as it would appear when addressing an envelope (for example: city, state, and ZIP code on one line). After this envelope address, print a blank line, then print the phone number and e-mail address on two additional lines.
For your sample run, use your own personal address, or the address of any other
resident of Massachusetts.
struct DATE
{
int month, day, year;
apstring weekday; // Sunday, Monday, etc.
};
For 10 pts.: Write a program that accepts and stores address information from many people rather than one person. (You'll need to learn about arrays, and use an array of structure variables.)