-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUI.cpp
More file actions
36 lines (28 loc) · 708 Bytes
/
UI.cpp
File metadata and controls
36 lines (28 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <stdio.h>
#include <windows.h>
#include <string>
#include <vector>
using namespace std;
void gotoxy( short x, short y )
{
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE) ;
COORD position = { x, y } ;
SetConsoleCursorPosition( hStdout, position ) ;
}
int main(){
gotoxy(0,0); cout << "Start";
gotoxy(50,50); cout << "STOP!!!!";
for(int i=0; i <50; i++){
gotoxy(i,i);
printf("a");
}
int j = 0;
for(int i=50; i >0; i--){ //x goes from 50 and goes down to 0
gotoxy(i,j);
printf("b");
j++; // Y coordinate
}
gotoxy(15,15); printf("Main Menu");
return 0;
}