Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ahmed Sami:
- #include <iostream>
- using namespace std;
- struct mailing{
- string name [2];
- int zip[2];
- char state[3][3];
- string address1[2],address2[2];
- };
- void info(){
- struct mailing m;
- for(int i=0;i<2;i++){
- int j =0;
- int k =1;
- cout<<"Enter your name : ";
- cin>>m.name[i];
- cout<<"\n Entre your zipcode of your city : ";
- cin>>m.zip[i];
- cout<<"\n Entre first address : ";
- cin>>m.address1[i];
- cout<<"\nEntre second address : ";
- cin>>m.address2[i];
- cout<<"\nEntre state two litters only : ";
- cin>>m.state[i][j];
- cin>>m.state[i][k];
- ++j;
- ++k;
- }
- for(int l=0;l<2;l++){
- int j =0;
- int k =1;
- cout<<"NAME : ";
- cout<<m.name[l];
- cout<<"\nZIPCODE : ";
- cout<<m.zip[l];
- cout<<"\n FIRST ADDRESS : ";
- cout<<m.address1[l];
- cout<<"\nSECOND ADDRESS : ";
- cout<<m.address2[l];
- cout<<"\n STATE : ";
- cout<<m.state[l][j];
- cout<<m.state[l][k];
- ++j;
- ++k;
- }
- }
- int main()
- {
- info();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement