Untitled
unknown
plain_text
a year ago
549 B
1
Indexable
Never
#include<iostream> using namespace std; class top { public: int a; void getdata() { cout<<"\n\n Enter First Number IS:::\t"; cin>>a; } void putdata() { cout<<"\n First Nuber Is :::\t"<<a; } }; class middle:public top { public: int b; void square() { getdata(); b=a*a; cout<<"\n\nsquarels:::"<<b; } }; class bottom :public middle { public: int c; void cube() { square(); c=b*a; cout<<"\n\ncube:::\t"<<c; } }; int main() { bottom b1; b1.cube(); }