Hello;
i wrote this code for a star triangle , but it told me it contains some errors , Do any 1 can help me plz ?
it should be like this :
*******
*****
***
*
include <iostream>
#include<cmath>
using namespace std;
int main()
{ int n=4;
for ( int i=n;i>0;i--)
{for (int space=i; space <n; space++)
{cout<<" ";
for (int j=1;j<=(2i-1); j++)
cout<<"*";}
cout<<endl;
return 0;
}