Program rysuje trójkąt o podanej wysokości
#include <iostream>
#include <string>
using namespace std;
int main()
{
int x;
cout<<"Podaj wysokosc trojkata: ";
cin>>x;
int y=x;
for(int i=0;i<=x;i++){
if (y==-1)break;
string choinka(i,'*');
cout<<choinka<<endl;
string spacja(y,' ');
cout<<spacja;
y--;
}
cout<<endl;
system("pause");
return 0;
}
