You are on page 1of 2

/*

* To change this license header, choose License Headers in Project Properties.


* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: faisal
*
* Created on 17 May, 2016, 9:31 AM
*/
#include <cstdlib>
#include<iostream>
#include<math.h>
using namespace std;
/*
*
*/
struct publication{
char propname[25];
char pubcompname[25];
int phone;
char address[25];
};
struct booklist{
int bookno;
char bookname[25];
char subject;
int price;
int edition;
struct publication p;
};
struct record{
char authorname;
int authorno;
struct booklist b[2];
} author[2];

int main()
{
int i,j;
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
cout<<"enter publication address of"<<j+1<<" book of"<<i+1<<" author";
cin>>author[i].b[j].p.address;
}
}
cout<<author[0].b[1].p.address;

return 0;
}

You might also like