Hey guys, basically I have to write a program that makes the word "DOWN" appear at the top (near middle) and the word "UP" at the bottom (near middle) and when my program runs they are supposed to both at the same time move. "UP" is supposed to be on the upper part of the console and "DOWN" is supposed to be on the lower part of the console. It must move a line per second.
I'm probably halfway done, but could use some assistance. Just something to steer me into the right direction
Also, is there an alternative for system("cls") or any of the system functions? If you could provide an alternative or explanation, or even a forum regarding it, that would be awesome.
1. a) Use functions rather than repetitive code.
b) Use either a loop or the built-in string functions to output a specific number of the same character.
2. The purpose of using a stream of newline characters '\n' is to get the previous content to scroll off of the visible console area, thus avoiding the need to clear the screen. If you tune the total number of lines output each time to be the same fixed number, the content should display in a predictable manner. Using functions makes this easier to achieve.