If so, it's probably that each 'segment' of the tree is an iteration of the outer loop, each line is an iteration of the middle loop, and each character is an iteration of the inner loop. Correct?
Your existing program is close. Can you see the pattern with the number of spaces as compared to the number of stars? Your looping conditions are your problem.
Edit: Also you can put [output] before your christmas tree and then [/output] after to make it keep the leading spaces, otherwise the forum removes the leading spaces. Similarly, you can use [code][/code] around your code to syntax highlight it:
when i run the program it does the spaces correctly kind of but it is like it does it backwards and i've been trying to figure this out for about 4 hours now lol.
I will continue and let you know if i do figure it out. Thanx for your help.
I fixed your program's formatting (I noticed you used pre-increment, you're automatically awesome!) and ran it myself: http://ideone.com/4JC5f7
The problem is the loop condition for your spaces. It is the same as your loop condition for your stars, meaning 1 star = 1 space. You need to use a tweak to make the space loop run more times at the beginning of the outer loop and less times at the end: http://ideone.com/5XgHaZ
int x = 3;
int y = 3;
int a = ++x; //pre-increment: x equals 4, a equals 4
int b = y++; //post-increment: y equals 4, b equals 3 (the old value of y)
It drives me crazy (don't ask why) when people use post-increment in their for loops, but you used pre-increment so you are therefore awesome and deserve to take a break from this for a while.