Thanks for the code! That helps!
So your code is saying:
Nine times,
Nine times,
print a '*' followed by a new line
So you get 81 lines with one asterisk.
From what you want to print out, it looks like you want something more like this:
Ten times,
print 10,9,8,7,... '*', followed by a new line
So your code is pretty close, but here are a few ideas:
First, This line:
for (int x = 1; x < 10; x++)
does the following code 9 times, not 10. Why? because the FIRST time is 1 and it stops when i is LESS THAN 10, so it does 1..9.
Mostly folks in c/c++ do loops starting with 0, but you could also just say '<=', so either of these will give you 10 iterations:
for (int x = 0; x < 10; x++) // 0..9
for (int x = 1; x <= 10; x++) // 1..10
Second, the second loop should probably do one fewer iterations each time. A simple way to do that here would be to loop one less time than x:
for (int y = x; y < 10; y++) // will do 10 the first time, 9 the second, etc
Third, you want to print '*' for each y iteration, and THEN print the new line:
for x
{
for y
{
}
print new line here
}
I'm not sure what the rest of the code is trying to accomplish, but maybe this will get you going in the right direction.
Good luck!