Tuesday, March 13, 2012

FAST FOOD AUTOMATION


#include<stdio.h>
#include<conio.h>
int a,m,b,c,stock=0;

void display()
                                {
                                                clrscr();
                                                printf("=======================<<Menu>>=========================");
                                                printf("\n========================================================");
                                                printf("\n!    Code  !        Items               !   Price     !");
                                                printf("\n========================================================");
                                                printf("\n!  Code 1: ! Price of Simple Burger is  !   Rs 20/-   !");
                                                printf("\n!  Code 2: ! Price of non-veg Burger is !   Rs 30/-   !");
                                                printf("\n!  Code 3: ! Price of coke is           !   Rs 25/-   !");
                                                printf("\n!  Code 4: ! Price of veg Pizza is      !   Rs 45/-   !");
                                                printf("\n!  Code 5: ! Price of non-veg pizza is  !   Rs 65/-   !");
                                                printf("\n!=====================================================!");
                                                printf("\n!  Code 6:  Make the Bill.                                              !");
                                                printf("\n!  Code 7:  Palace the New Order.                     !");
                                                printf("\n=========================================================");
                                };

void entry()
                {
                                                play:
                                                printf("\n\nEnter the Product Code:");
                                                scanf("%d",&a);
                };

void product1()
                {
                                                c=20;
                                                printf("\n<<veg-berger>>");
                                                printf("\nEnter the quantity:");
                                                scanf("%d",&b);
                                                c=c*b;
                                                stock=stock+c;
                };

void product2()
                {
                                                printf("\n<<Non-veg berger>>");
                                                printf("\nEnter the quantity:");
                                                scanf("%d",&b);
                                                c=30;
                                                c=c*b;
                                                stock=stock+c;
                };
void product3()
                {
                                                printf("\n<<coke>>");
                                                printf("\nEnter the quantity:");
                                                scanf("%d",&b);
                                                c=25;
                                                c=c*b;
                                                stock=stock+c;
                };

void product4()
                {
                                                printf("\n<<Veg Pizza>>");
                                                printf("\nEnter the quantity:");
                                                scanf("%d",&b);
                                                c=45;
                                                c=c*b;
                                                stock=stock+c;
                };
void product5()
                {
                                printf("\n<<Non-Veg Pizza>>");
                                printf("\nEnter the quantity:");
                                scanf("%d",&b);
                                c=65;
                                c=c*b;
                                stock=stock+c;
                };
void product6()
                {
                                printf("\nNet Bill is:%d",stock);
                };
void product7()
                {
                                printf("\nNew program.");
                                printf("\nNet Bill is:%d",stock);
                };
 void fdisplay()
                {

                                printf("\n====================================================");
                                printf("\nItems             Rate           Qty           Cost");
                                printf("\n====================================================");


                                if(a==1)
                                {
                                printf("\nveg-berger");
                                }

                                if(a==2)
                                {
                                printf("\nNon-veg berger");
                                }

                                if(a==3)
                                {
                                printf("\ncoke");
                                }

                                if(a==4)
                                {
                                printf("\nVeg Pizza");
                                }
                 if(a==5)
                                {
                                printf("\nNon-Veg Pizza");
                                }

                        printf("\n====================================================");
                                printf("\nNet Bill is:                                    %d",stock);
                                printf("\n====================================================");
                };

main()
{
                int p;
                g:
                printf("\nEnter the password:");
                scanf("%d",&p);
                if(p==1)
                {
                 goto play;
                }
                if(p!=1)
                {
                 printf("<<Your Password is wrong entter again>>");
                 goto g;
                }
                play:
                display();
                entry();
                                                                if(a==1)
                                                                {
                                                                product1();
                                                                entry();
                                                                }
                                                                if(a==2)
                                                                {
                                                                product2();
                                                                entry();
                                                                }
                                                                if(a==3)
                                                                {
                                                                product3();
                                                                entry();}

                                                         if(a==4)
                                                                {
                                                                product4();
                                                                entry();
                                                                }

                                                                if(a==5)
                                                                {
                                                                product5();
                                                                entry();
                                                                }

                                                                if(a==6)
                                                                {
                                                                product6();
                                                                fdisplay();
                                                                entry();
                                                                }

                                                                if(a==7)
                                                                {
                                                                product7();
                                                                goto play;
                                                                }

                getch();
}

No comments:

Post a Comment