We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8ff197 commit ec7bd53Copy full SHA for ec7bd53
bookclass.cpp
@@ -0,0 +1,33 @@
1
+#include<iostream>
2
+using namespace std;
3
+class BOOKX {
4
+ private:
5
+ char book_name;
6
+ char book_author;
7
+ int book_price;
8
+ int book_edition;
9
+ public:
10
+ void input() {
11
+ cout<<"Book name:";
12
+ cin>>book_name;
13
+ cout<<endl;
14
+ cout<<"Book author:";
15
+ cin>>book_author;
16
17
+ cout<<"Book price:";
18
+ cin>>book_price;
19
20
+ cout<<"book edition:";
21
+ cin>>book_edition;
22
23
+ }
24
+ void output() {
25
+ cout<<"Book name"<<book_name<<"Author"<<book_author<<"price"<<book_price<<"edition"<<book_edition;
26
27
+};
28
+int main() {
29
+ BOOKX a;
30
+ a.input();
31
+ a.output();
32
+ return 0;
33
+}
0 commit comments