How make thing like "*" move randomly by c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

How make thing like "*" move randomly by c++

9th Apr 2018, 9:19 PM
muhamedetish
6 Answers
+ 7
I think he's talking about something like while True: for i in range(20): os.system('cls' if sys.platform == 'Windows' else 'clear') print(' ' * i + '*') time.sleep(0.03) for i in range(10): os.system('cls' if sys.platform == 'Windows' else 'clear') print('\n' * i + ' ' * 20 + '*') time.sleep(0.03) for i in range(20, -1, -1): os.system('cls' if sys.platform == 'Windows' else 'clear') print('\n' * 10 + ' ' * i + '*') time.sleep(0.03) for i in range(9, -1, -1): os.system('cls' if sys.platform == 'Windows' else 'clear') print('\n' * i + '*') time.sleep(0.03) but in C++, rather than Python.
10th Apr 2018, 6:49 PM
Fox
Fox - avatar
9th Apr 2018, 9:29 PM
BroFar
BroFar - avatar
+ 1
Please explain like we were stupid.
10th Apr 2018, 4:05 PM
Timon Paßlick
- 1
I want to "*" move randomly inside the box
9th Apr 2018, 9:25 PM
muhamedetish
- 1
Understand me ؟!
9th Apr 2018, 9:28 PM
muhamedetish
- 1
https://code.sololearn.com/cWl9qFX2HVrO/?ref=app i want "+" inside box move randomly
9th Apr 2018, 9:36 PM
muhamedetish