Multilevel inheritances C++ program to display pattern like the right angle

Write a program in C++ to make such a pattern like the right angle triangle with a number that will repeat a number in a row using the multilevel inheritances in object-oriented programming.

c++ palindrome program without arrays
class diagram of pattern like the right angle Multi-level Inheritance

pattern of right angle triangle C++

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.