أخواني أنا كتبت كثير من الأكواد وأعرف الأكواد بشكل جيد ولكن هذا السؤال حيرني كيف أبغا أجيب الأعداد متشابهة لا أدري كيف يكتب الكوت بهذا السؤال
write a C++ program that reads a positive integer, greater than zero, from the user and then outputs a triangle of stars and numbers. The size of the triangle depends on the integer entered by the user. The first three rows should always be the same as in the example below (you have to find a suitable formula to print them) and again the rest of rows have numbers as in the example below.
Example, if the user enters the number 5 as input, the following triangle appears on the screen:
1
1 2
1 2 3
4 4 4 4
5 5 5 5 5