using namespace std;
for (int i=5; i>=1; i--) // A loop for spaces
for (int Space=1; Space <= i ; Space++)
}// Printing Spaces
for (int Star=5; Star>=i; Star--) // loop for stars
cout<<"* "; // Notice that one extra space, that creates the equi. triangle shape.. But don't just copy the code. See how it works. use algorithms to crack the problems. Cheers
Hope that helps. But really dude, try to break the algorithms. Try to break the solution in steps.
Even in this example, I first created those spaces. (I couldn't see them, so swapped with dots and when got the perfect result, changed back to spaces)
Then I created those stars. All i needed was one space after them. This is the way you learn. For more, join my page:
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: