Check this out.I could not get exact output
#include<iostream> using namespace std; class notebook{ private: string bookname; int id; int price; public: notebook() { bookname; id; price; } int getprice() { return price; } void display() { cout<<"enter details"<<endl; cout<<"enter bookname"<<endl; cin>>bookname; cout<<"enter id"<<endl; cin>>id; cout<<"enter price"<<endl; cin>>price; } }; class notebook2 { private: string bookname; int id; int price; public: notebook2() { bookname; id; price; } int getprice() { return price; } void display() { cout<<"enter details of sacond car"<<endl; cout<<"enter bookname"<<endl; cin>>bookname; cout<<"enter id"<<endl; cin>>id; cout<<"enter price"<<endl; cin>>price; } }; int main() { notebook n1; notebook2 n2; int p1,p2,sum; p1=n1.getprice(); p2=n2.getprice(); sum=p1+p2; if(sum%2==0) cout<<"sum is even"<<endl; n2.display(); if(sum%2==!0) cout<<"sum is odd"<<en