1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream inputFile;
string name1, name2, name3, name4, name5, name6, name7, name8, name9, name10,
street_number1, street_number2, street_number3, street_number4, street_number5,
street1, street2, street3, street4, street5, street6, street7, street8, street9, street10, street11,
city1, city2, city3, city4, city5,
state1, state2, state3, state4, state5,
zipcode1, zipcode2, zipcode3, zipcode4, zipcode5,
num1, num2, num3, num4, num5,
weight1, weight2, weight3, weight4, weight5;
inputFile.open("Mailings.txt");
// Ann Perkins
inputFile >> name1;
inputFile >> name2;
inputFile >> street_number1;
inputFile >> street1;
inputFile >> street2;
inputFile >> city1;
inputFile >> state1;
inputFile >> zipcode1;
inputFile >> num1;
inputFile >> weight1;
// Ron Swanson
inputFile >> name3;
inputFile >> name4;
inputFile >> street_number2;
inputFile >> street3;
inputFile >> street4;
inputFile >> street5;
inputFile >> city2;
inputFile >> state2;
inputFile >> zipcode2;
inputFile >> num2;
inputFile >> weight2;
// Andy Dwyer
inputFile >> name5;
inputFile >> name6;
inputFile >> street_number3;
inputFile >> street6;
inputFile >> street7;
inputFile >> city3;
inputFile >> state3;
inputFile >> zipcode3;
inputFile >> num3;
inputFile >> weight3;
// Ben Wyatt
inputFile >> name7;
inputFile >> name8;
inputFile >> street_number4;
inputFile >> street8;
inputFile >> street9;
inputFile >> city4;
inputFile >> state4;
inputFile >> zipcode4;
inputFile >> num4;
inputFile >> weight4;
// Chris Traeger
inputFile >> name9;
inputFile >> name10;
inputFile >> street_number5;
inputFile >> street10;
inputFile >> street11;
inputFile >> city5;
inputFile >> state5;
inputFile >> zipcode5;
inputFile >> num5;
inputFile >> weight5;
// Ann
cout << name1 << " " << name2 << endl << street_number1 << " " << street1 << " " << street2 << endl
<< city1 << " " << state1 << " " << zipcode1 << endl << endl;
// Ron
cout << name3 << " " << name4 << endl << street_number2 << " " << street3 << " " << street4 << " " << street5 << endl
<< city2 << " " << state2 << " " << zipcode2 << endl << endl;
// Andy
cout << name5 << " " << name6 << endl << street_number3 << " " << street6 << " " << street7 << endl
<< city3 << " " << state3 << " " << zipcode3 << endl << endl;
// Ben
cout << name7 << " " << name8 << endl << street_number4 << " " << street8 << " " << street9 << endl
<< city4 << " " << state4 << " " << zipcode4 << endl << endl;
// Chris
cout << name9 << " " << name10 << endl << street_number5 << " " << street10 << " " << street11 << endl
<< city5 << " " << state5 << " " << zipcode5 << endl << endl;
return 0;
}
|