#include<iostream.h>
#include<conio.h>
class book
{
private :
int bookno;
char bname[30];
char auname[30];
float bprice;
public :
void getdata()
{
cout<<"Enter the details"<<endl;
cout<<"Enter the book no:"; cin>>bookno;
cout<<"Enter the book name: ";cin>>bname;
cout<<"Enter author name : "; cin>>auname;
cout<<"Enter the book price: ";cin>>bprice;
}
void display()
{
cout<<endl<<"The entered record is: "<<endl;
cout<<"Book no: "<<bookno<<endl;
cout<<"Book name: "<<bname<<endl;
cout<<"Author name: "<<auname<<endl;
cout<<"Book price: "<<bprice<<endl;
}
};
int main()
{
class book obj;
clrscr();
obj.getdata();
obj.display();
getch();
return 0;
}