You are on page 1of 5

Example 1:

#include <iostream>
#include<windows.h> // header file for gotoxy
using namespace std;

//***************** gotoxy
COORD coord= {0,0}; // this is global variable
void gotoxy(int x,int y)
{
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
int main()
{
//*****************wall design 1
char corner1 = 178;

for(int xx=0;xx<80;xx++) {
for(int yy=0;yy<26;yy++) {
gotoxy(xx,yy);cout<<corner1;
}
}
return 0;
}

Example 2:

#include <iostream>
#include<windows.h> // header file for gotoxy
#include <stdlib.h> //for cls
#include<time.h> //timer

using namespace std;

//***************** gotoxy
COORD coord= {0,0}; // this is global variable
void gotoxy(int x,int y)
{
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
//****************** timer
void delay(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}

//*****************wall design 1
char corner1 = 178;
void design1()
{
for(int xx=0;xx<80;xx++) {
for(int yy=0;yy<26;yy++) {
gotoxy(xx,yy);cout<<corner1;
delay(10);}}
}

//*****************main menu
int main()
{

design1();

return 0;
}

Example 3:
#include <iostream>
#include<windows.h> // header file for gotoxy
#include <stdlib.h> //for cls
#include<time.h> //timer

using namespace std;

//***************** gotoxy
COORD coord= {0,0}; // this is global variable
void gotoxy(int x,int y)
{
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
//****************** timer
void delay(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}

//*****************wall design 2
char corner2 = 219;
void design2()
{
for(int xx=10;xx<60;xx++) {
for(int yy=5;yy<16;yy++) {
gotoxy(xx,yy);cout<<corner2;
delay(10);}}
}

//*****************shadow
char corner3 = 177;
void design3()
{
for(int xx=12;xx<62;xx++) {
for(int yy=6;yy<17;yy++) {
gotoxy(xx,yy);cout<<corner3;
delay(10);}}
}

//*****************main menu
int main()
{
design3();
design2();

return 0;
}

Example 4:
#include <iostream>
#include<windows.h> // header file for gotoxy
#include <stdlib.h> //for cls

using namespace std;

//***************** gotoxy
COORD coord= {0,0}; // this is global variable
void gotoxy(int x,int y)
{
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}

//*****************wall design 1
char corner1 = 178;
void design1()
{
for(int xx=0;xx<80;xx++) {
for(int yy=0;yy<26;yy++) {
gotoxy(xx,yy);cout<<corner1;
}}
}
//*****************wall design 2
char corner2 = 219;
void design2()
{
for(int xx=10;xx<60;xx++) {
for(int yy=5;yy<16;yy++) {
gotoxy(xx,yy);cout<<corner2;
}}
}

//*****************shadow
char corner3 = 177;
void design3()
{
for(int xx=12;xx<62;xx++) {
for(int yy=6;yy<17;yy++) {
gotoxy(xx,yy);cout<<corner3; }}
}

//*****************main menu
int main()
{
int mnum;
int data;
design1();
design3();
design2();

return 0;
}

Example 5:
#include <iostream>
#include<stack>
#include<windows.h> // header file for gotoxy
#include <stdlib.h> //for cls

using namespace std;

//*****************global variable
int yum =0;
int spicy =0;
float total=0;
//***************** gotoxy
COORD coord= {0,0}; // this is global variable
void gotoxy(int x,int y)
{
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
//*****************wall design 1
char corner1 = 178;
void design1()
{
for(int xx=0;xx<80;xx++) {
for(int yy=0;yy<26;yy++) {
gotoxy(xx,yy);cout<<corner1; }}
}

//*****************main menu
int main()
{
int mnum;
int data;
design1();

do {
gotoxy(15,7);cout<<"Jollibee Bestseller Order Menu ";
gotoxy(15,9); cout<<"1. Burgers";
gotoxy(15,10);cout<<"2. Chicken Joy";
gotoxy(15,11);cout<<"3. Exit";
gotoxy(15,13);cout<<"Enter a number [ ]";
gotoxy(31,13);cin>>mnum;

//system("cls");
switch(mnum)
{
case (1):
gotoxy(17,15);cout<<"1. Yumburger[ 0]";
gotoxy(17,16);cout<<"2. Spicy Chump[ 0]";
gotoxy(17,18);cout<<"Total Amount P ";
gotoxy(31,15);cin>>yum;
gotoxy(33,16);cin>>spicy;
total = (yum*10)+(spicy*20);
gotoxy(17,18);cout<<"Total Amount P"<<total;

break;
case (2): break;
case (3):
exit(1);
system("cls");
}
} while (1);
return 0;
}

You might also like