I'm trying to create a program where the user inputs a number and, after a calculation, displays a certain number of spaces on the screen, followed by a star. e.g. If the user enters the number 9, the calculation would work out that 4spaces are needed, followed by *.
Is there any way I can get the number 4 to convert into 4 spaces?
I havent tried anything because i dont know how to do it. I've got as far as getting the user to enter the number, and then performing the calculation, but I don't know how to get the answer to the calculation into the corresponding number of spaces.