took me a long time to figure out how to make this program going from right to left, to left to right. I now need to figure out how to make it hit the screen edge and start heading back in the next direction and bounce.
please dont just "tell" me the answer but if you can give me some hints id appreciate it.
pos = 77;//tells program to start at position 77
spaces = 0;
cout << " ";//displays empty space
cout << "A " << "\r";
Sleep(75);//speeds up the program
thanks again im sorry i have not been checking the forum over the weekend.
this is what i wrote in class today, its going back and forth forever, which is what i need but its not going to the end of page just back and forth... ?
That's not I had in mind. You could make 2 while statements, one going from, let's say, right to left and another going from left to right. And when you want some code to repeat itself all you have to do is put something around it.
You could even ask the user how many times you want it to loop and use the answer to create the new statement.
1 2 3 4 5 6 7
insert something here
while1 ( 78 to 0 )
while2 ( ? to ?? )
The answer I give here, may help you with your program. The word will go back and forth on the screen, but the program also rotates the word. Just leave that part out if you don't need it. Hope this helped..
thanks everybody, im nt going to ope the link tho @whitenite. I appreciate it but i figured it out with only using one while statement...
it works anyways and ive handed it in.
again everyone thanks for all the tips your wonderfull !