Professional Documents
Culture Documents
#include<windows.h>
#include<conio.h>
COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
void chippy();
void nova();
void piattos();
void moby();
int exit();
int main()
int sel;
cout<<"\n\n\n\tMenu Selection"<<endl;
cin>>sel;
switch(sel){
case 1:
chippy();
break;
case 2:
nova();
break;
case 3:
piattos();
break;
case 4:
moby();
break;
case 5:
exit();
break;
default:
getch();
system("cls");
main();
void chippy(){
system("cls");
int amount;
cin>>amount;
if(amount==15){
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
getch()==0;
system("cls");
main();
}else if(amount>15){
int change;
change=amount-15;
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
}
system("cls");
main();
}else{
cout<<"\n\t\t\t_INSUFFICIENT AMOUNT_"<<endl;
getch();
chippy();
void nova(){
system("cls");
int amount;
cin>>amount;
if(amount==20){
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
getch()==0;
}
system("cls");
main();
}else if(amount>20){
int change;
change=amount-20;
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
system("cls");
main();
}else{
cout<<"\n\t\t\t_INSUFFICIENT AMOUNT_"<<endl;
getch();
nova();
}
void piattos(){
system("cls");
int amount;
cin>>amount;
if(amount==21){
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
getch()==0;
system("cls");
main();
}else if(amount>21){
int change;
change=amount-21;
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
system("cls");
main();
}else{
cout<<"\n\t\t\t_INSUFFICIENT AMOUNT_"<<endl;
getch();
piattos();
void moby(){
system("cls");
int amount;
cin>>amount;
if(amount==10){
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
while(getch()!=13){
getch()==0;
system("cls");
main();
}else if(amount>10){
int change;
change=amount-10;
cout<<"\n\n\n\t\t\tDispensing....."<<endl;
do{
gotoxy(a,12);cout<<char(219);
gotoxy(46,12);cout<<per<<"%";
Sleep(200);
a++;
per=per+5;
}while(a<=44);
system("cls");
main();
}else{
cout<<"\n\t\t\t_INSUFFICIENT AMOUNT_"<<endl;
getch();
moby();
int exit(){
system("cls");
while(a<15){
gotoxy(x,y);cout<<char(215);
Sleep(10);
a++;
x++;
while(a<=20){
gotoxy(x,y);cout<<char(215);
Sleep(10);
a++;
y++;
while(a<=35){
gotoxy(x,y);cout<<char(215);
Sleep(10);
a++;
x--;
while(a<=41){
gotoxy(x,y);cout<<char(215);
Sleep(10);
a++;
y--;
gotoxy(23,8);cout<<"THANK YOU!!";
cout<<"\n\n\n\n\n";
return 0;