In this C++ program, we will have a look at how to write a C++ program to demonstrate an example of hierarchical inheritance to get square and cube of a number.
In this C++ program, we will have a look at how to write a C++ program to demonstrate an example of hierarchical inheritance to get square and cube of a number.