#include <iostream> #include <string> #include <cstdlib> using namespace std; st
ID: 3648686 • Letter: #
Question
#include <iostream>#include <string>
#include <cstdlib>
using namespace std;
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;
}
int main(){
Address add = { 18451, "Hatteras", "Street", "Tarzana", "CA", 91314 };
show( add );
}
I NEED this-->>
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
-------------------------------------------
In this example, this show function would call the previous show function 2 times.
Explanation / Answer
yes it is correct.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.