0% found this document useful (0 votes)
152 views19 pages

My Term Project

This program summarizes a supermarket billing system with 3 categories - clothes, sports items, and electronics items. For clothes, the user selects an item type, brand, price range, and quantity. For sports items, the user selects indoor or outdoor, a game type, and quantities of items to calculate the total. For electronics, the user selects an item, company, price range, and quantity to display the total cost. Control structures like if/else statements and switch cases are used to navigate the options and calculate billing amounts.

Uploaded by

Satyam Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
152 views19 pages

My Term Project

This program summarizes a supermarket billing system with 3 categories - clothes, sports items, and electronics items. For clothes, the user selects an item type, brand, price range, and quantity. For sports items, the user selects indoor or outdoor, a game type, and quantities of items to calculate the total. For electronics, the user selects an item, company, price range, and quantity to display the total cost. Control structures like if/else statements and switch cases are used to navigate the options and calculate billing amounts.

Uploaded by

Satyam Pandey
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 19

SUPERMARKET BILLING

Submitted in the partial fulfillment of the Degree of Bachelor of Technology (Integrated-M tech) In Computer Science and Engineering SUBMITTED BY:Name Regd. No Roll no GUIDED BY: Miss -

SUBMITTED TO
Department of Computer Science and Engineering Lovely Professional University , Phagwara

ACKNOWLEDGEMENT
I take this opportunity to present my votes of thanks to all those guidepost who really acted as lightening pillars to enlighten our way throughout this term paper project that has led to successful and satisfactory completion of this study. We are really grateful to our HOD Mr. for providing us with an opportunity to undertake this term paper project in this university and providing us with all the facilities. We are highly thankful to Miss. for her active support, valuable time and advice, whole-hearted guidance, sincere cooperation and pains-taking involvement during the study and in completing the assignment of preparing the said term paper project within the time stipulated. Lastly, We are thankful to all those, particularly the various friends , who have been instrumental in creating proper, healthy and conductive environment and including new and fresh innovative ideas for us during the term paper, their help, it would have been extremely difficult for us to prepare the term paper project in a time bound framework.

Name Regd. No Roll no -

TABLE OF CONTENTS
1.

2. 3. 4.
5.

6.

Introduction. summary of program. Source code ( i.e., program coding ). Sample of Outputs of program . Future scope of project Bibliography

INTRODUCTION
In the existing system, most of the records are maintained on paper. It becomes very inconvenient to modify the data. In the existing system, here is a possibility that the same data in different registers may have different values which means the entries of the same data do not match. This inconsistent state does not supply the concrete information which poses a problem in the case information related to particular search record. Our project is very useful. User is no longer required to check his register in search of records, as now it can be searched over the software by choosing some options. The user need not to type in most of the information. He/she is just required to enter the desired options. On the whole it liberates the user from keeping lengthy manual records. In a nutshell, it abates the work load of an organization. In todays world, no one likes to perform calculations on calculator or manually when computer is there. Every one wants his/her work to be done by computer automatically and displaying the result for further manipulations.

SUMMARY
In this program I had called a function named supermarket billing in which I had used a switch caes to make three cases i.e ., of clothes , sports items , electronics item . In 1st case i.e, of clothes I had used nesting of if else to enter and choose as per the condions entered by user in which I had used a structure named clothes to input three things for cloth items i.e, one for brand selection second is for range selection and third is for number of items i.e, quantity of item user want to purchase . In 2nd case i.e, of sports item I had used switch case to enter the type of game i.e, either indoor or outdoor and then I had simply put it all in different cases for no. of qtys and calculating each item as per range entered by user . In 3rd case i.e, of electronics I had used another switch case to enter the item user want to buy like fm , radio, ipods etc. and after entering into it I had again used if else statement to enter the Co. , range , number of items user want to buy and at last I had calculated it as per the range and discount offered at the input time .

CONCEPT USED IN PROGRAM

1 function prototypes, calling from main() fn. 2 - use of struture to input data of clothes type items like a) Brand of Co. b) Range of item of particular item selected . c) Quantity of item. 3 Use of control statements like a) if else ladder b) nested if c) switch case 4 Use of jump statements like goto.

SOURCE CODE
#include<stdio.h> #include<conio.h> struct clothes //a structure to input elements of clothes { int co; //for brand selection in clothes int range; //for selection of range in clothes int qty; //for quantity of no. of clothes }s; //variable of structure cloth void supermarketbilling() { int a,c,d,e,f; float g; char b[10]; printf("\n\n\t\t -:PLEASE ENTER YOUR NAME:-\n\t\t\t"); gets(b); printf("\n\t\tWELCOME TO BIG BAZAAR %s",b); lp: printf("\n\n\n\t\tPLEASE SELECT CATORGARIES OF YOUR ITEMS\n"); printf("\n\t\t\tPRESS 1 FOR CLOTHES\n\t\t\tPRESS 2 FOR SPORTS ITEMS "); printf("\n\t\t\tPRESS 3 ELECTRONICS ITEMS\n\t\t\t"); printf("\n\t\t\tENTER CHOICE No. "); scanf("%d",&a); switch(a) { case 1: //case for cloth items { clothes: printf("\n\t\tPLEASE SELECT WHAT DO YOU WANT TO PURCHASE\n"); printf("\n\t\t\tPRESS 1: JEANS\n\t\t\tPRESS 2: SHORTS "); printf("\n\t\t\tPRESS 3: SHIRTS\n\t\t\tPRESS 4: CARGOS"); printf("\n\t\t\tPRESS 5: RETURN TO PREVIOUS MENU\n\t\t\tENTER CHOICE NO. "); scanf("%d",&c); if(c==1||c==2||c==3||c==4) //start of nested if { printf("\n\t\t\t-:SELSECT BRAND:-\n\n\t\t\t1 - DENIM\n\t\t\t2 LEVIS\n\n\t\t\tENTER CHOICE No. "); scanf("%d",&s.co); { if(c==1||c==4) { printf("\n\t\t\t-:SELECT RANGE:-\n\t\t\t1 - >800\n\t\t\t2 - <=800 ");

scanf("%d",&s.range); printf("\n\t\t\t-:ENTER QUANTITY:-\n\t\t\t "); scanf("%d",&s.qty); if(s.range==1) { g=700*s.qty; printf("\n\t\tYOU HAVE TO PAY Rs. %f",g); printf("inclu. all taxes and discount "); goto clothes; } else if(s.range==2) { g=880*s.qty; printf("\n\tYOU HAVE TO PAY Rs. %f",g); printf(" inclu. all taxes and discount\n\n\t\t\t "); goto clothes; } else printf("\n\t\tYOU HAVE ENTERED WRONG CHOICE "); goto clothes; } else if(c==2||c==3) { printf("\n\t\t\t-:SELECT RANGE:-\n\t\t\t1 - >150\n\t\t\t2 - <=150 "); scanf("%d",&s.range); printf("\n\t\t\t-:ENTER QUANTITY:-\n\t\t\t "); scanf("%d",&s.qty); if(s.range==1) { g=135*s.qty; printf("\n\tYOU HAVE TO PAY Rs. %f",g); printf(" inclu. all taxes and discount\n\n\t\t\t "); goto clothes; } else if(s.range==2) { g=165*s.qty; printf("\n\t\tYOU HAVE TO PAY Rs. %f",g); printf("inclu. all taxes and discount\n\n\t\t\t "); goto clothes; } else printf("\n\t\tYOU HAVE ENTERED WRONG CHOICE "); goto clothes; } else

printf("\n\t\tYOU HAVE ENTERED WRONG CHOICE "); goto clothes; } } else if(c==5) goto lp; else printf("\n\tYOU HAVE ENTERED WRONG CHOICE SO YOUR TRANSACTION HAS BEEN CANCELLED"); goto lp; } //end of nested if case 2: { //case of sports item kk:

//label printf("\n\t\t\tPRESS 1 FOR INDOOR GAMES\n\t\t\tPRESS 2 FOR OUTDOOR GAMES "); printf("\n\t\t\tPRESS 3 GO BACK"); printf("\n\t\t\tENTER CHOICE NO. "); scanf("%d",&c); switch(c) { case 1: jkl: //label printf("\n\t\t\tSELECT GAME\n\t\t\t1 - CHESS \n\t\t\t2 CAROMBOARD\n\t\t\t3 - TABLE TENNIS"); printf("\n\t\t\t4 - SNOOKER\n\t\t\t5 - GO BACK"); printf("\n\t\t\tENTER CHOICE NO. "); scanf("%d",&d); switch(d) { case 1: printf("\n\t\t\tENTER QUANTITY "); scanf("%d",&e); g=100*e; printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto jkl; case 2: printf("\n\t\t\tENTER QUANTITY "); scanf("%d",&e); g=125*e; printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto jkl; case 3: printf("\n\t\t\tENTER QUANTITY OF BALLS & TENNIS IN PAIRS "); scanf("%d%d",&e,&f);

g=(10*e)+(60*f); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto jkl; case 4: printf("\n\t\t\tENTER QUANTITY OF BALLS & STICKS "); scanf("%d%d",&e,&f); g=(25*e)+(125*f); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto jkl; case 5: goto kk; default: printf("\n\tYOU HAVE ENTERED WRONG CHOICE SO YOUR TRANSACTION HAS BEEN CANCELLED"); goto kk; } case 2: mb: printf("\n\t\t\tSELECT GAME\n\n\t\t\t1 - HOCKEY\n\t\t\t2 CRICKET\n\t\t\t3 - TENNIS\n\t\t\t"); printf("4 - BADMINTON\n\t\t\t5 - BASKET BALL\n\t\t\t6 - VOLLY BALL\n\t\t\t7 - FOOTBALL"); printf("\n\t\t\t8 - GO BACK\n\t\t\tENTER CHOICE NO. "); scanf("%d",&d); switch(d) { case 1: printf("\n\t\t\tENTER QUANTITY OF BALLS & STICKS"); scanf("%d%d",&e,&f); g=(45*e)+(220*f); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 2: printf("\n\t\t\tENTER QUANTITY OF BALLS , BATS "); scanf("%d%d",&e,&f); g=(55*e)+(320*f); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 3: printf("\n\t\t\tENTER QUANTITY OF BALLS & RACKETS"); scanf("%d%d",&e,&f); g=(40*e)+(120*f); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 4: printf("\n\t\t\tENTER QUANTITY OF SHUTTLE COCKS & RACKETS");

scanf("%d%d",&e,&f); g=(8*e)+(60*f); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 5: printf("\n\t\t\tENTER QUANTITY OF BASKET BALLS "); scanf("%d",&e); g=(145*e); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 6: printf("\n\t\t\tENTER QUANTITY OF VOLLY BALLS "); scanf("%d%d",&e); g=(125*e); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 7: printf("\n\t\t\tENTER QUANTITY OF FOOTBALLS "); scanf("%d%d",&e); g=(125*e); printf("\n\t\t\tYOU HAVE TO PAY AMOUNT -> Rs.%f",g); goto mb; case 8: goto kk; default: printf("\n\tYOU HAVE ENTERED WRONG CHOICE SO YOUR TRANSACTION HAS BEEN CANCELLED"); goto kk; } case 3: goto lp; default: printf("\n\tYOU HAVE ENTERED WRONG CHOICE SO YOUR TRANSACTION HAS BEEN CANCELLED"); goto lp; } } case 3://case for electronics items { kkk: printf("\n\t\t\tSELECT ITEM\n\t\t\t1 - FREQUENCY MODULATOR(F.M)\n\t\t\t2 - HEAD PHONES"); printf("\n\t\t\t3 - IPODS\n\t\t\t4 - GO BACK\n\t\t\tENTER CHOICE NO. "); scanf("%d",&c); switch(c) { case 1:

printf("\n\t\t\tSELECT COMPANY\n\t\t\t1 - PHILIPS\n\t\t\t2 - INTEX\n\t\t\t3 - GO BACK"); printf("\n\t\t\tENTER CHOICE NO. "); scanf("%d",&d); if(d==1) { printf("\n\t\t\tENTER RANGE\n\t\t\t1 - <1500\n\t\t\t2 - >1500 "); scanf("%d",&e); printf("\n\t\t\tENTER QTY "); scanf("%d",&f); g=200*f; printf("\n\t\t\tYOU HAVE TO PAY Rs. %f",g); goto kkk; } if(d==2) {printf("\n\t\t\tENTER RANGE\n\t\t\t1 - <1500\n\t\t\t2 - >1500 "); scanf("%d",&e); printf("\n\t\t\tENTER QTY "); scanf("%d",&f); g=220*f; printf("\n\t\t\tYOU HAVE TO PAY Rs. %f",g); goto kkk; } if(d==3) { goto kkk; } else { printf("\n\t\tYOU HAVE ENTERED WRONG CHOICE "); goto kkk; } case 2: printf("\n\t\t\tSELECT COMPANY\n\t\t\t1 - PHILIPS\n\t\t\t2 - INTEX\n\t\t\t3 - GO BACK"); printf("\n\t\t\tENTER CHOICE NO. "); scanf("%d",&d); if(d==1) { printf("\n\t\t\tENTER RANGE\n\t\t\t1 - <1500\n\t\t\t2 - >1500 "); scanf("%d",&e); printf("\n\t\t\tENTER QTY "); scanf("%d",&f); g=200*f; printf("\n\t\t\tYOU HAVE TO PAY Rs. %f",g); goto kkk; } if(d==2) {printf("\n\t\t\tENTER RANGE\n\t\t\t1 - <1500\n\t\t\t2 - >1500 "); scanf("%d",&e); printf("\n\t\t\tENTER QTY ");

scanf("%d",&f); g=220*f; printf("\n\t\t\tYOU HAVE TO PAY Rs. %f",g); goto kkk; } if(d==3) { goto kkk; } else { printf("\n\t\tYOU HAVE ENTERED WRONG CHOICE "); goto kkk; } case 3: printf("\n\t\t\tSELECT COMPANY\n\t\t\t1 - PHILIPS\n\t\t\t2 - INTEX\n\t\t\t3 - GO BACK"); printf("\n\t\t\tENTER CHOICE NO. "); scanf("%d",&d); if(d==1) { printf("\n\t\t\tENTER RANGE\n\t\t\t1 - <1500\n\t\t\t2 - >1500 "); scanf("%d",&e); printf("\n\t\t\tENTER QTY "); scanf("%d",&f); g=200*f; printf("\n\t\t\tYOU HAVE TO PAY Rs. %f",g); goto kkk; } if(d==2) {printf("\n\t\t\tENTER RANGE\n\t\t\t1 - <1500\n\t\t\t2 - >1500 "); scanf("%d",&e); printf("\n\t\t\tENTER QTY "); scanf("%d",&f); g=220*f; printf("\n\t\t\tYOU HAVE TO PAY Rs. %f",g); goto kkk; } if(d==3) { goto kkk; } else { printf("\n\t\tYOU HAVE ENTERED WRONG CHOICE "); goto kkk; } case 4: goto lp; default: printf("\n\tYOU HAVE ENTERED WRONG CHOICE SO YOUR TRANSACTION HAS BEEN CANCELLED"); goto lp; } }

} } int main() { printf("\tMADE BY:-\n\tGURUDUTT GOSWAMI\n\tSEC:-\tK2106\n\n\n\n\n\t\t\t"); printf("-:MY TERM PAPER:-\n\t\t\tSUPER MARKET BILLING"); supermarketbilling(); getch(); }

OUTPUT SCREENS SAMPLES

FUNCTIONS TO BE PROVIDED:
The system will be user friendly and completely menu driven so that the users shall have no problem in using all options. o The system will be efficient and fast in response. o The system will be customized according to needs. o The system is reliable and understandable for a normal user so as to fulfill all his requiremants in a very easier manner .

FUTURE SCOPE OF THE PROJECT


Our project will be able to implement in future after making some changes and modifications as we make our project at a very low level. So the modifications that can be done in our project are: a) Use of more cases so as to provide all options available for user b) Use of some type of graphics to look our front screen window more attractive c) Use of more structure to inhance our program compatibility d) To make use of file handling so as to make it as easier as possible and many such more changes which bring this program make in use for moles and shop in reality.

BIBLIOGRAPHY:The contents used to make the source code and the the whole term paper are collected from the following books mentioned and also a little bit from the internet to see the procedure and way of program design:1. Programming with ANSI and Turbo C by Ashok N Kamthane for guidance. 2. Byron S Gottfried 3. Sumita Arora 4. Our textbook Behrouz A Frouzen. 5. Some data is collected from the help of the Yashwant kanatkar. 6. Use of the wikepedia. 7. And the little bit guidence by my Classmates.

You might also like