You are on page 1of 2

#include <iostream>

#include <windows.h>
using namespace std;
COORD coordinate;
void gotoxy(int x,int y){
coordinate.X=x; coordinate.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coordinate);
}
void tabel(){
//atas bawah
gotoxy(2,3);cout<<"|-------------|";
gotoxy(4,11);cout<<"|-------------|"<<endl;
//kiri
gotoxy(2,4);cout<<"|";
gotoxy(2,5);cout<<"|---------|";
gotoxy(2,6);cout<<"|";
gotoxy(2,7);cout<<"|---------|";
gotoxy(2,8);cout<<"|";
gotoxy(2,9);cout<<"|---------|";
gotoxy(2,10);cout<<"|";
//tengah
gotoxy(6,4);cout<<"|";
gotoxy(6,5);cout<<"|---------|";
gotoxy(6,6);cout<<"|";
gotoxy(6,7);cout<<"|---------|";
gotoxy(6,8);cout<<"|";
gotoxy(6,9);cout<<"|---------|";
gotoxy(6,10);cout<<"|";
//kanan
gotoxy(16,4);cout<<"|";
gotoxy(16,5);cout<<"|";
gotoxy(16,6);cout<<"|";
gotoxy(16,7);cout<<"|";
gotoxy(16,8);cout<<"|";
gotoxy(16,9);cout<<"|";
gotoxy(16,10);cout<<"|";
}
void data(){
gotoxy(4,4);cout<<"1";
gotoxy(4,6);cout<<"2";
gotoxy(4,8);cout<<"3";
gotoxy(4,10);cout<<"4";
gotoxy(8,4);cout<<"Eli";
gotoxy(8,6);cout<<"Aqshal";
gotoxy(8,8);cout<<"Kubil";
gotoxy(8,10);cout<<"Amore";
}
int main(){
tabel();

data();
}

You might also like