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 37 38 39 40 41 42
|
void main()
{
//Vending Switch Food
enum vfood{A0, A1, A2, A3, A4, B0, B1, B2, B3, B4, C0, C1, C2, C3, C4, D0, D1, D2, D3, D4};
switch(vmachine)
{
case 1:
switch (vfood)
{
cout <<"Vending Machine: Omnomnom 0001" <<endl;
cout <<"Enter a letter followed by a number (A0) to purchase the item" <<endl;
cout <<"A0" << setw (10) << "A1" << setw (10) << "A2" << setw (10) << "A3" << setw (10) << "A4" <<endl;
cout <<"B0" << setw (10) << "B1" << setw (10) << "B2" << setw (10) << "B3" << setw (10) << "B4" <<endl;
cout <<"C0" << setw (10) << "C1" << setw (10) << "C2" << setw (10) << "C3" << setw (10) << "C4" <<endl;
cout <<"D0" << setw (10) << "D1" << setw (10) << "D2" << setw (10) << "D3" << setw (10) << "D4" <<endl;
cout <<"" <<endl;
cin >>vfood;
case 'A0':
cout <<"You have selected: AO" <<endl;
case 'B0':
cout <<"You have selected: B0" <<endl;
}
break;
case 2:
cout <<"Vending Machine: Pew Pew 0001" <<endl;
break;
case 3:
cout <<"Vending Machine: /Flex 0001" <<endl;
break;
case 4:
cout <<"Vending Machine: Pot-ables 0001" <<endl;
break;
case 5:
cout <<"Vending Machine: Fancy 0001" <<endl;
break;
default:
cout <<"You can't count...." <<endl;
}
system("PAUSE"); //Testing purposes
}
|