Thanks*** But could use some help with fine tuning

how do I remove the extra line on displa notice if you enter five id like it too look like this
*
**
***
****
*****
****
***
**
*
#include<iostream>
using namespace std;
int main()
{ int TS,x,y; //TriangleSize
cout<<"enter Triangle size"<<endl;
cin >> TS;

for (int x=1; x<=TS; x++)
{
for (int y=0; y<x; y++)
{
cout << "*";
}
cout << endl;
}

for (int x=TS; x>=1;--x)
{
for(int y=1; y<=x; ++y)
{
cout<<"*";
}
cout<<endl;
}
system("Pause");
return 0;
}


Last edited on
nevermind got it
Topic archived. No new replies allowed.