#include <iostream>
#include <string>
int main()
{
const int height = 4;
for (int i = 1; i <= height; ++i)
{
for (int j = 0; j <= i; ++j)
{
if (j == 0 || j == i)
{
std::cout << std::to_string(i);
if (i == 1) break;
}
else
{
std::cout << '*';
}
}
std::cout << std::endl;
}
}
Comments
Leave a comment