0

#include<windows.h>
#include<iostream.h>
#include<iomanip.h>
int main()
{
char choice,
do{
system('cls');
cout<<”\n\t\tHi!welcome to JKK the best tapsihan!”;
cout<<"\nEnter your choice of food.";
cout<<"\nWhile eating the program will be on standby if there are any side orders,when done just press 10 to bill out";
cout<<"\n\n\t\tMenu"
<<"\n\t[1]Tapsilog . . . . .\tPhp 25.00"
<<"\n\t[2]Longsilog . . . . .\tPhp 25.00"
<<"\n\t[3]Tosilog . . . . .\tPhp 25.00"
<<"\n\t[4]Hotsilog . . . . .\tPhp 25.00"
<<"\n\t[5]Torsilog . . . . .\tPhp 25.00"
<<"\n\t[6]Chicksilog . . . . .\tPhp 35.00"
<<"\n\t[7]Bangsilog . . . . .\tPhp 35.00"
<<"\n\t[8]Ice Tea . . . . .\tPhp 15.00"
<<"\n\t[9]Coke . . . . .\tPhp 20.00"
cout<<"\n\t[10]Bill Out";
cin>>choice;

switch(choice)
{
case '1'

what if the user chooses two orders,how will it appear when the user checks out?
I mean for example I like to order 2 Tosilog,how is that possible?

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Akill10
0

Maybe put it all in a do..while loop. This way, it will keep asking for input so you can press 1,2 etc multiple times. You will need an array or something similar to store the inputs though. Then at each case, it adds the food name to the array.

Edited by Akill10: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.