#include <iostream>
usingnamespace std;
int main ()
{ int max_row=5;// you can chang it value
for(int i=0;i<max_row;i++){
for(int j=0;j<max_row;j++){
if(j>=i){ cout<<"*";}else{cout<<" ";}
}
cout<<endl;
}
return 0;
}
#include <iostream>
usingnamespace std;
int main()
{
for (int x = 0; x < 5; x++)
{
for (int y = 1; y < x + 1; y++)
{
cout << " ";
}
for (int y = 5; y > x; y--)
{
cout << "*"
}
cout << endl;
}
}