1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
do {
Household houses[13] = {{1041, 12180, 4}, {1062, 13240, 3}, {1327, 19800, 2},
{1483, 22458, 8}, {1900, 22458, 2}, {2112, 17000, 7},
{2345, 18125, 2}, {3210, 15623, 6}, {3600, 3200, 5},
{3601, 6500, 2}, {4724, 11970, 2}, {6217, 8900, 2},
{9280, 6200, 1}};
std::cout << "----------Household Survey----------\n\n" <<
"ID Number\tAnnual Income\tHousehold Members" << std::endl;
for(int i = 0; i < 13; ++i) {
std::cout << houses[i].idNumber << "\t\t" << houses[i].income <<
"\t\t" << houses[i].members << std::endl;
}
std::cout << "\nDo you want to run this program again? Y/N: ";
std::cin >> again;
std::cout << endl;
} while (again == 'y' || again == 'Y');
|