Monday, 10 December 2012

Using C++ Switch statement create the Choose Any deal Program in MC DONALD

#include<iostream.h>
#include<conio.h>
void main()
{int opt;
cout<<"mc donal counter program"<<endl<<endl;
cout<<"-----Select Any One Deal-----"<<endl;
cout<<"1--- pepsi with french fries 100RS "<<endl;
cout<<"2--- pepsi with double fish flish 295RS "<<endl;
cout<<"3--- pepsi with cheese buger 190RS "<<endl;
cout<<"4--- pepsi with chiken burger 21RS "<<endl;
cout<<"5--- pepsi with zinger burger 250RS "<<endl;
cin>>opt;
switch(opt)
{
    case 1:
        gotoxy(15,14);
        cout<<"You have selected Deal number = "<<opt<<endl;
        gotoxy(20,17);
        cout<<"--------Reciept--------"<<endl;
        gotoxy(13,18);
        cout<<"choosed pepsi with french fries for RS 100 "<<endl;
        gotoxy(28,19);
        cout<<"thank You"<<endl;
        break;
    case 2:
        gotoxy(15,14);
        cout<<"You have selected Deal number = "<<opt<<endl;
        gotoxy(20,17);
        cout<<"--------Reciept--------"<<endl;
        gotoxy(13,18);
        cout<<"choosed pepsi with double fish flish for RS 295 "<<endl;
        gotoxy(28,19);
        cout<<"thank You"<<endl;
        break;
    case 3:
        gotoxy(15,14);
        cout<<"You have selected Deal number = "<<opt<<endl;
        gotoxy(20,17);
        cout<<"--------Reciept--------"<<endl;
        gotoxy(13,18);
        cout<<"choosed pepsi with cheese buger 190RS "<<endl;
        gotoxy(28,19);
        cout<<"thank You"<<endl;
        break;
    case 4:
        gotoxy(15,14);        cout<<"You have selected Deal number = "<<opt<<endl;


        gotoxy(20,17);
        cout<<"--------Reciept--------"<<endl;
        gotoxy(13,18);
        cout<<"choosed pepsi with chiken burger 215RS "<<endl;
        gotoxy(28,19);
        cout<<"thank You"<<endl;
        break;
    case 5:
        gotoxy(15,14);
        cout<<"You have selected Deal number = "<<opt<<endl;
        gotoxy(20,17);
        cout<<"--------Reciept--------"<<endl;
        gotoxy(13,18);
        cout<<"choosed pepsi with zinger burger 250RS "<<endl;
        gotoxy(28,19);
        cout<<"thank You"<<endl;
        break;

}
getch();
}