Single Inheritance
Single Inheritance
com/c/ComputerScienceAcademy7
h ps://youtu.be/0fKQhG3hqZ4
#include<iostream.h>
#include<conio.h>
// 1. Single inheritance
void display()
{
cout<<"Number = "<<a<<endl;
}
};
void displaysq()
{
cout<<"Square = "<<sq<<endl;
}
};
void main()
{
clrscr();
square s;
s.getdata(25);
s.display();
s.getsquare();
s.displaysq();
getch();