Tutaj masz przykład:
#include <iostream>
using namespace std;
int main()
{
string si="*";
int i=1;
int n;
cout<<"Podaj dlugość boku: "<<endl;
cin>>n;
while (i<=n)
{
cout<<si<<endl;
si+="*";
i++;
}
return 0;
}
Edytowałem kod- teraz powinno być okej :)
Daj znać czy o to chodziło :)