13MLTLVI - } }; } class mult:private num2 { float res;...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> #include<conio.h> # class num1 { protected: int n1; public: void getinfo() { cout<<"Enter the values\n"; cin>>n1; } void showinfo() { cout<<n1<<endl; } }; } class num2:public num1 { protected: int n2; public: void get() { cout<<"Enter the values\n"; cin>>n2; } void show() { cout<<n2<<endl;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } }; } class mult:private num2 { float res; public: void cal() { getinfo(); get(); res=n1*n2; } void disp() { showinfo(); show(); cout&lt;&lt;&quot;result &quot;&lt;&lt;res; } }; } void main() { clrscr(); mult m; m.cal(); m.disp(); getch(); }...
View Full Document

This note was uploaded on 10/25/2010 for the course CMPN SEM1 taught by Professor Thakur during the Fall '06 term at University of Mumbai.

Page1 / 2

13MLTLVI - } }; } class mult:private num2 { float res;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online