#include<iostream>
using namespace std;
class book
{
public :
int id;
string title,aut;
void input()
{
cout<<"Enter id,title,author=";
cin>>id>>title>>aut;
}
void dis()
{
cout<<id<<endl<<title<<endl<<aut;
}
};
int main()
{
book b1,b2;
b1.input();
b2.input();
cout<<endl;
b1.dis();
cout<<endl;
b2.dis();
}
Categories
About Me
Popular Posts
-
#include<iostream> #include<string.h> using namespace std; class book { private: int page; string name; float price; publi...
-
Write a program to fill the entire screen with a smiling face.The smiling face has an ASCII value 1.C++ Code #include<iostream> using namespace std; int main() { char a=1; int i=0; while (i<5000) { cout<<a;...
-
C++ Code #include<iostream> using namespace std; int main() { int a=0,b=1,r,i,c; cout<<"Enter range="; c...
Tuesday, 14 June 2016
Popular Posts
-
#include<iostream> #include<string.h> using namespace std; class book { private: int page; string name; float price; publi...
-
Write a program to fill the entire screen with a smiling face.The smiling face has an ASCII value 1.C++ Code #include<iostream> using namespace std; int main() { char a=1; int i=0; while (i<5000) { cout<<a;...
-
C++ Code #include<iostream> using namespace std; int main() { int a=0,b=1,r,i,c; cout<<"Enter range="; c...