Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

struct Address{ unsigned number; string street; string suffix; string city; stri

ID: 3648706 • Letter: S

Question

struct Address{
unsigned number;
string street;
string suffix;
string city;
string state;
unsigned zip;
};


void show( const Address & address ){
cout<<"void show( const Address & address ); ";
cout<<address.number<<" "<<address.street<<" "<<address.suffix<<endl;
cout<<address.city<<" "<<address.state<<" "<<address.zip<<endl;
}

void show( const Address address[], unsigned addressElements,
const unsigned desiredZip[], unsigned desiredZipElements );

Output all the addresses in address whose zip code matches any of the zip codes in desiredZip. Call the previous show function to do the output for each zip code. For instance, if desiredZip contained the two elements 91971 and 91975, then this show function might output
6401 Wetka Avenue
City0 CA 91071
-------------------------------------------
4792 Vura Boulevard
City1 CA 91971
-------------------------------------------
2001 Ranch Road
City2 Park CA 91971
-------------------------------------------
1234 Vory Boulevard
City3 CA 91975
-------------------------------------------
992 Sup Avenue
City4 CA 91975
-------------------------------------------

please write the function
void show( const Address address[], unsigned addressElements,
const unsigned desiredZip[], unsigned desiredZipElements );
and include what goes on in main

thanks!

Explanation / Answer

#include using namespace std; int main() { int num, count; cout