C++ Program to make such a pattern like a pyramid with numbers increased by 1

Write a program in C++ to make such a pattern like a pyramid with numbers increased by 1 by using the virtual base class in object oriented programming.

logic of C++ program to print pyramid pattern of numbers

Output

Enter the number of Rows. 4

1

22

33

4444

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.