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;
}