Salam kod budur
1 | #include <iostream> |
2 | #include <conio.h> |
3 | #include <string.h> |
4 | using namespace std; |
5 | int main(){ |
6 | system("color 5a"); |
7 | string ilan,left,right,up; |
8 | ilan="0000000000"; |
9 | left=" "; |
10 | right=" "; |
11 | up="\n\n\n\n\n\n\n\n\n\n"; |
12 | int a=0; |
13 |
14 | cout<<up<<left<<ilan<<right; |
15 | start: |
16 | switch(getch()){ |
17 | case 'd':{ |
18 | if(a==35){ |
19 | goto start; |
20 | } |
21 | left=left+ " "; |
22 | a++; |
23 | system("CLS"); |
24 | cout<<up<<left<<ilan<<right; |
25 | goto start; |
26 | break; |
27 | } |
28 | case 'a':{ |
29 |
30 | |
31 | goto start; |
32 | break; |
33 | } |
34 | default:{ |
35 | goto start; |
36 | } |
37 | |
38 | } |
39 | getch(); |
40 | } |
Indi bu ilanın sola hərəkətin necə düzəldək?
Sual verin
Cavab verin