#include <iostream>
#include <conio.h>
#include <string.h>

class telephone
{
char name[10];
char telenum[20];
char city[10];

public:
telephone()
{strcpy(name,"");strcpy(telenum,"");strcpy(city,"");}

void read();
char* Fname(){return name;}
char* Ftelenum(){return telenum;}
char* Fcity(){return city;}
};

void telephone::read()
{
cout << "Enter the name: ";
cin >> name;
cout << "Enter the Tel number: ";
cin >> telenum;
cout << "Enter the city: ";
cin >> city;
}

void main()
{
telephone obj[2];
for (int x=0;x<2;x++)
obj[x].read();
cout << "\n\tName\t" << "Tele\t" << "City\n";
cout << "=====================================\n";

for (int x=0;x<2;x++)
cout << "\t" << obj[x].Fname() << "\t" << obj[x].Ftelenum() << "\t" << obj[x].Fcity() << endl;
getch();
}