In pseudo-code, then:
Code:
nRows = input()
for currentRowNumber in nRows...1
print currentRowNumber of '@', then '\n'
or, if you don't want to go backwards:
Code:
nRows = input()
for i from 0 until nRows exclusive:
print (nRows - i) of '@', then '\n'
What are you trying to accomplish with the "useless" variable?
You can use an inner loop to print the right number of '@', or you can use something like std::string's fill constructor.
I recommend you remove everything within your outermost loop and start from there.