".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
You might be tempted to leave out the spaces at the end of the string, but then the pattern is incomplete. All lines should be of equal length, otherwise there is no symmetry. It also needs exception-handling, so I included that in the example. A simple and naive example, I admit, but it works and the output will be technically correct based on your question.
A more complex variation might be done by counting the amount of #. Each line has one fewer # than the previous one, with the - just being filler until you reach the correct amount of #. I'd image that requires some form of loop, counting, and creating a string based on that count.
thanks in advance.
No problem, glad I could help
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
Doesn't your textbook provide information about for-loops?
This problem is an obvious example of a homework assignment in an introductory programming course. It is elementary. If you, at the moment, cannot handle this problem by yourself, then go back to your books to learn how to do it. Don't expect to find a for-loop tutor around here. Don't expect to find someone to provide a solution for you to hand in as if it was your work.
You may present your own code, and ask "Why doesn't this work?", and someone may be as kind as to point out where you are wrong. Not by giving you the right answer, but by pointing at what you should check and fix up yourself.
When a communications packet is transmitted/received in the parent application, it queues it to the child application and then the child application decodes it and formats it into a user friendly format and displays it.