-
Notifications
You must be signed in to change notification settings - Fork 2
/
Canteen Management System
1352 lines (1281 loc) · 28.5 KB
/
Canteen Management System
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
& COMPUTER SCIENCE PROJECT WORK &
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
SOFTWARE FOR THE USE IN COMPUTERS SHOP
***INTRODUCTION***
/////////////////////////////
NAME:- BHAVISHAY NIGAM
CLASS:- XII SEC:- 'N.M'
ROLL NO:- '8'
/////////////////////////////
####################
# STAR COMPUTERS #
####################
/*
### HEADER FILES ###
*/
#include<fstream.h> //for reading and writing files
#include<conio.h> //for clrscr()
#include<string.h> //for string characters
#include<stdio.h> //for gets and puts function
#include<process.h> //for exit function
#include<iomanip.h> //for setw function
#include<dos.h> //for delay and sleep function
#include<graphics.h> //for textcolor & textbackground
class consumer
{
int cno;
char cname[20];
char adress[20];
int a,b,c;
float i;
public:
//FUNCTION TO ENTER THE VALUES
public:
void entry()
{
clrscr();
textcolor(RED);
gotoxy(32,4);
cputs("S.T.A.R COMPUTERS");
gotoxy(5,8);
cputs("Customer ID :");
gotoxy(5,10);
cputs("Customer name :");
gotoxy(5,12);
cputs("Customer adress :");
gotoxy(5,14);
cputs("Customer Service number :");
gotoxy(5,16);
cputs("Costumer Smart card number :");
gotoxy(5,18);
cputs("Costumer Phone number :");
gotoxy(5,20);
cputs("Customer Bill number :");
gotoxy(45,8);
cin>>cno;
gotoxy(45,10);
gets(cname);
gotoxy(45,12);
gets(adress);
gotoxy(45,14);
cin>>a;
gotoxy(45,16);
cin>>b;
gotoxy(45,18);
cin>>c;
gotoxy(45,20);
cin>>i;
}
//FUNCTION TO DISPLAY THE VALUES
void display()
{
cout<<"\n\n";
gotoxy(5,8);
cputs("Customer ID :");
cout<<cno;
gotoxy(5,10);
cputs("Customer name :");
puts(cname);
gotoxy(5,12);
cout<<"Customer adress :"<<adress;
gotoxy(5,14);
cout<<"Customer Service number :" <<a;
gotoxy(5,16);
cout<<"Costumer Smart card number :"<<b;
gotoxy(5,18);
cout<<"Costumer Phone number :"<<c;
gotoxy(5,20);
cout<<"Customer Bill number :"<<i<<"\n";
}
int rcno()
{
return cno;
}
}c;
//FUNCTION TO WRITE THE VALUES
void write()
{
char ch;
consumer c;
fstream f1;
c.entry();
f1.open("main.dat",ios::app|ios::binary);
cout<<"\n\n\tDO you want to save the record(y/n)\t";
cin>>ch;
if(ch=='y')
{
f1.write((char*)&c,sizeof(c));
}
f1.close();
}
//FUNCTION TO READ THE VALUES
void read()
{
consumer c;
fstream f1;
f1.open("main.dat",ios::in|ios::binary);
while(!f1.eof())
{
f1.read((char*)&c,sizeof(c));
c.display();
if(f1.eof())
{
cout<<"\n\n End of the file reached\n\n";
}
}
f1.close();
}
//FUNCTION FOR SEARCHING THE RECORD
void search()
{
consumer c;
int rn;
char found='n';
ifstream f1("main.dat",ios::in);
cout<<"\n\n Enter Customer ID you want to SEARCH :\t";
cin>>rn;
while(!f1.eof())
{
f1.read((char*)&c,sizeof(c));
if(c.rcno()==rn)
{
c.display();
found='y';
break;
}
}
if(found=='n')
cout<<"\n\n\tRECORD NOT FOUND!!!!!!!!!!!!!\n"<<endl;
f1.close();
}
//FUNCTION TO DELELTE THE RECORD
void del()
{
ifstream f1("main.dat",ios::in);
ofstream f2("temp.dat",ios::out);
int rno;
char found='f',confirm='n';
cout<<"\n\n Enter Customer ID you want to DELETE :\t";
cin>>rno;
while(!f1.eof())
{
f1.read((char*)&c,sizeof(c));
if(c.rcno()==rno)
{
c.display();
found='t';
cout<<"\n\n Are you sure want to DELETE this record ? (y/n)\t";
cin>>confirm;
if(confirm=='n')
f2.write((char*)&c,sizeof(c));
}
else
f2.write((char*)&c,sizeof(c));
}
if(found=='f')
cout<<"\n\n\tRECORD NOT FOUND\n";
f1.close();
f2.close();
remove("main.dat");
rename("temp.dat","main.dat");
f1.open("main.dat",ios::in);
clrscr();
cout<<"\n\n\n Now the file contains\n\n\n";
while(!f1.eof())
{
f1.read((char*)&c,sizeof(c));
if(f1.eof())
c.display();
}
f1.close();
}
//FUNCTION TO MODIFY THE RECORD
void update()
{
fstream f1("main.dat",ios::in | ios::out | ios::binary);
int rno;
long pos;
char found='f';
cout<<"\n\n Enter the Customer ID you want to MODIFY :\t";
cin>>rno;
while(!f1.eof())
{
pos=f1.tellg();
f1.read((char*)&c,sizeof(c));
if(c.rcno()==rno)
{
c.entry();
f1.seekg(pos);
f1.write((char*)&c,sizeof(c));
found='t';
break;
}
}
if(found=='f')
cout<<"\n\n\tRECORD NOT FOUND\n";
f1.seekg(0);
clrscr();
cout<<"\n Now the file contains\n\n";
c.display();
f1.close();
getch();
}
//STARTING OF THE VOID MAIN
void main()
{
textbackground(LIGHTBLUE);
unsigned int sum,add,d,j,e,f,g,h,k,l,w,x,y,z,choice;
int abis=0,apep=0,aden=0,amun=0,aperk=0,acoc=0,atit=0,alux=0,atid=0,aree=0;
unsigned int m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;
int pend=0,print=0,graph=0,ram=0,hard=0,win=0,ant=0,p1=0,p2=0,g1=0,r1=0,h1=0,w1=0,an1=0,mo=0,mous=0,web=0,aweb=0,asc=0,scan=0,total=0;
char pu,str[10],yes,et;
clrscr();
// WELCOME SCREEN
clrscr();
lab:;
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t The legendary\n";
cout<<"\n\n\t\t\t\t MICHAEL JACKSON\n\n\n";
cout<<"\t\t\t\t King of POP\n\n\n";
cout<<"\t\t\t Born On -: 29 AUGUST ,GARY,INDIANA\n\n\n";
cout<<"\t\t\t Died On -: 25 JUNE ,LOS ANGELES\n\n\n";
cout<<"\t OCCUPATION -: DANCER,BUSSINESS MAN,SONG WRITER,SINGER,ACTOR\n\n\n";
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t WELCOME\n\n";
cout<<"\t\t\t\t TO\n\n";
cout<<"\t\t\t\t THE\n\n";
cout<<"\t\t\t WORLD OF C++\n";
getch();
clrscr();
pass:;
cout<<"\n\n\tPLEASE BE CAREFUL ENTER THE PASSWORD IN SMALL LETTERS\n";
cout<<"\n\t\tPASSWORD DOES NOT CONTAINS ANY NUMBER\n\n\n";
cout<<"\n\n\t\t\tEnter your Password\t";
str[0]=getch();
cout<<"*";
str[1]=getch();
cout<<"*";
str[2]=getch();
cout<<"*";
str[3]=getch();
cout<<"*";
str[4]=getch();
cout<<"*";
str[5]=getch();
cout<<"*";
str[6]=getch();
cout<<"*";
str[7]='\0';
cout<<"*";
if(strcmp(str,"michael")==0)
{
cout<<"\n\n\n\t\tPLEASE WAIT WHILE LOADING THE PROJECT";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(150);
cout<<".";
delay(200);
}
else
{
cout<<"\n\n\t\t\t$$$$$$ Ooop's wrong password $$$$$$\n";
cout<<"\n\n\t\t\t%%%%%% Please re-enter the password%%%%%%\n";
getch();
k++;
//getch();
if(k==3)
{
cout<<"\nExiting from the project!!!!! Bye\n";
getch();
exit(0);
}
goto pass;
}
textcolor(RED);
clrscr();
gotoxy(1,6);
textcolor(MAGENTA);
cputs(" COMPUTER SCIENCE PROJECT WORK \n");
printf(" \n");
printf("********************************************************************************");
textcolor(BLACK+WHITE+BLINK);
cout<<"\n";
cputs (" WELCOME TO THE S.T.A.R COMPUTERS \n");
printf("********************************************************************************\n");
printf("********************************************************************************\n");
gotoxy(2,21);
textcolor(GREEN);
cputs(" SCHOOL:-COLUMBIA FOUNDATION SEN.SEC SCHOOL ");
gotoxy(2,22);
cputs(" D-BLOCK VIKAS PURI ");
cout<<"\n";
printf("********************************************************************************\n");
printf("********************************************************************************\n");
gotoxy(1,29);
textcolor(BROWN);
cputs(" SUBJECT TEACHER:-MR.NAVEEN GUPTA \n");
cout<<"\n\n";
printf("********************************************************************************\n");
printf("********************************************************************************\n");
gotoxy(1,37);
textcolor(LIGHTGRAY);
cputs(" BY:- BHAVISHAY NIGAM \n");
gotoxy(1,39);
cputs(" CLASS:- XII NON MED \n");
gotoxy(1,41);
cputs(" ROLL NO:- (8)EIGHT \n");
gotoxy(1,43);
cputs(" YEAR:- 2010-2011 \n");
cout<<"\n\n";
printf("********************************************************************************\n");
printf("********************************************************************************\n");
cout<<"\n\n";
textcolor(LIGHTCYAN+BLINK);
gotoxy(45,48);
cputs("PRESS ENTER TO CONTINUE!!!!!!");
getch();
clrscr();
//DETAILS OF THIS PROJECT
gotoxy(25,10);
textcolor(RED);
cputs("WELCOME TO THE WORLD OF COMPUTERS .");
gotoxy(5,15);
cputs("THIS PROJECT CONTAINS SOME ITEMS AND SIMPLE THING YOU HAVE TO DO IS:-");
gotoxy(5,17);
cputs("ENTER THE NAME , CUSTOMER ID , SERIAL NUMBER , SMART CARD NUMBER etc.");
gotoxy(5,19);
cputs("THEN PURCHASE THE ITEMS AND REMEMBER THE QUANTITY ITEMS CARRY.");
gotoxy(5,21);
cputs("YOU CAN ALSO MODIFY , DELETE , SEARCH A RECORD.");
gotoxy(5,23);
cputs("YOU CAN ALSO ALL RECORDS YOU HAVE ENTERED IN YOUR COMPUTER.");
gotoxy(5,25);
cputs("BUT DO NOT EXPECT FOR ANY DISCOUNT.");
gotoxy(5,27);
cputs("WE HOPE THAT YOU WILL BE SATISFIED WITH OUR SERVICE.");
gotoxy(5,29);
cputs("WE ARE NOT RESPONSIBLE FOR ANY DEFECT IN THE PRODUCT YOU PURCHASE.");
getch();
clrscr();
//LOADING THE PROJECT
gotoxy(32,13);
textcolor(LIGHTGREEN);
cputs("********************");
gotoxy(32,15);
cputs("LOADING YOUR PROJECT");
gotoxy(32,17);
cputs("********************");
gotoxy(32,20);
textcolor(MAGENTA+BLINK);
cputs("PLEASE WAIT.........");
textcolor(RED+GREEN);
delay(500);
gotoxy(32,35);
cputs("10 % completed..");
delay(500);
gotoxy(32,35);
cputs("20 % completed...");
delay(500);
gotoxy(32,35);
cputs("30 % completed....");
delay(500);
gotoxy(32,35);
cputs("40 % completed.....");
delay(500);
gotoxy(32,35);
cputs("50 % completed......");
delay(500);
gotoxy(32,35);
cputs("60 % completed.......");
delay(500);
gotoxy(32,35);
cputs("70 % completed........");
delay(500);
gotoxy(32,35);
cputs("80 % completed.........");
delay(500);
gotoxy(32,35);
cputs("90 % completed..........");
delay(500);
gotoxy(32,35);
cputs("100 % completed...........");
delay(500);
// TO PURCHASE ,SEARCH ,MODIFY ,DELETE ,DISPLAY ALL RECORDS ,DETAILS ,NEW CUSTOMER
again:;
clrscr();
textbackground(LIGHTBLUE);
textcolor(GREEN);
cout<<"\n\t\t\t ^^^^^^^^^^^^^^^^^^^^^^^^^^^";
cout<<"\n\t\t\t !=========================!\n";
cout<<"\n\t\t\t !**** S.T.A.R CANTEEN ****!\n";
cout<<"\n\t\t\t !=========================!";
cout<<"\n\t\t\t ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n\n\n";
cout<<" \t\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$";
cout<<"\n\n\t\t\t* 1.NEW CUSTOMER *";
cout<<"\n\n\t\t\t* 2.DETAILS *";
cout<<"\n\n\t\t\t* 3.SEARCH A RECORD *";
cout<<"\n\n\t\t\t* 4.DELETE A RECORD *";
cout<<"\n\n\t\t\t* 5.MODIFY A RECORD *";
cout<<"\n\n\t\t\t* 6.DISPLAY ALL RECORDS *";
cout<<"\n\n\t\t\t* 7.QUANTITY AVAILABLE *";
cout<<"\n\n\t\t\t* 0.EXIT *\n";
cout<<"\n\t\t\t$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$";
cout<<"\n\n\n\n\t Enter your choice :\t";
cin>>d;
switch(d)
{
case 1:
clrscr();
textcolor(WHITE);
cout<<"\n\n\n\t\t\t S.T.A.R COMPUTERS";
cout<<"\n\n\n\t\t\t COSUMER INFORMATION";
// TO ENTER THE DETAILS OF THE COSTUMER
write();
// ITEMS AND THIER RATES
start:
cout<<"\n\n\nDO YOU WANT TO PURCHASE(Y/N):\n\n";
cin>>pu;
if(pu=='Y'||pu=='y')
{
clrscr();
// PURCHASE LIST
items:;
cout<<"\n\t\t\t\t*************";
cout<<"\n\t\t\t\tPURCHASE LIST";
cout<<"\n\t\t\t\t*************\n\n\n\n";
cout<<"\n\n\t\t\t1.PENDRIVE";
cout<<"\n\n\t\t\t2.SCANNER";
cout<<"\n\n\t\t\t3.PRINTER";
cout<<"\n\n\t\t\t4.WEBCAM";
cout<<"\n\n\t\t\t5.GRAPHIC CARD";
cout<<"\n\n\t\t\t6.RAM";
cout<<"\n\n\t\t\t7.HARD DISK";
cout<<"\n\n\t\t\t8.WINDOWS ORIGINAL CD'S";
cout<<"\n\n\t\t\t9.ANTIVIRUS";
cout<<"\n\n\t\t\t10.MOUSE";
cout<<"\n\n\n\t\t\tEnter your choice\t";
cin>>choice;
if(choice==1)
{
//ITEMS AND RATES
bis:;
clrscr();
cout<<"\n\n\t\t\t\tPENDRIVES\n\n";
cout<<"\n ITEMS\t\t\t\t\tRATE\n";
cout<<"\n 1. 2GB\t\t\t\t\t350\n";
cout<<" 2. 4GB\t\t\t\t\t500\n";
cout<<" 3. 5GB\t\t\t\t\t700\n";
cout<<" 4. 8GB\t\t\t\t\t800\n";
cout<<" 5. 16GB\t\t\t\t\t1800\n";
cout<<" 6. 32GB\t\t\t\t\t2400\n";
cout<<" 7. 64GB\t\t\t\t\t3000\n";
cout<<"\n\n\tWhich PENDRIVE you want to purchase\t";
cin>>p1;
if(p1==1)
{
pend=350;
}
else if(p1==2)
{
pend=500;
}
else if(p1==3)
{
pend=700;
}
else if (p1==4)
{
pend=800;
}
else if(p1==5)
{
pend=1800;
}
else if(p1==6)
{
pend=2400;
}
else if(p1==7)
{
pend=3000;
}
else if(p1==0)
{
goto items;
}
else if(p1!=1||p1!=2||p2!=3||p1!=4||p1!=5||p1!=6||p1!=7)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto bis;
}
cout<<"\n\tPENDRIVE(MAX 5): \t";
cin>>m;
if(m>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
getch();
goto items;
}
else
abis=1000-m;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==2)
{
pep:;
clrscr();
cout<<"\n\n\t\t\t\tSCANNER\n\n";
cout<<"\n ITEMS\t\t\t\tRATE\n";
cout<<"\n 1.FLATBED\t\t\t\t5000\n";
cout<<" 2.SHETFED\t\t\t\t6000\n";
cout<<" 3.PHOTO SCANNER\t\t\t4500\n";
cout<<" 4.FILM SCANNER\t\t\t8000\n";
cout<<" 5.PORTABLE SCANNER\t\t\t10000\n";
cout<<"\n\n\tWhich SCANNER do you want to purchase\t";
cin>>scan;
if(scan==1)
{
asc=5000;
}
else if(scan==2)
{
asc=6000;
}
else if(scan==3)
{
asc=4500;
}
else if(scan==4)
{
asc=8000;
}
else if(scan==5)
{
asc=10000;
}
else if(scan==0)
{
goto items;
}
else if(scan!=1||scan!=2||scan!=3||scan!=4||p1!=5)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto pep;
}
cout<<"\n\n\tSCANNER(MAX 5):\t ";
cin>>n;
if(n>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
getch();
goto items;
}
else
apep=1000-n;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==3)
{
den:;
clrscr();
cout<<"\n\n\t\t\t\tPRINTER\n\n";
cout<<"\n ITEMS\t\t\t\tRATE\n";
cout<<"\n 1. HP Laser jet\t\t\t2000\n";
cout<<" 2. DOT Matrix Printer\t\t\t500\n";
cout<<"\n\n\tWhich PRINTER you want to purchase\t";
cin>>p2;
if(p2==1)
{
print=500;
}
else if(p2==2)
{
print=2000;
}
else if(p2==0)
{
goto items;
}
else if(p2!=1||p2!=2)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto den;
}
cout<<"\n\tPRINTER(MAX 5):\t ";
cin>>o;
if(o>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
goto items;
}
else
aden=110-o;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==4)
{
mun:;
clrscr();
cout<<"\n\n\t\t\t\tWEBCAM\n\n";
cout<<"\n ITEMS\t\t\t\t\tRATE\n";
cout<<"\n 1.5 PIXEL\t\t\t\t\t1500\n";
cout<<" 2.8 PIXEL\t\t\t\t\t6000\n";
cout<<" 3.12 PIXEL\t\t\t\t\t12000\n";
cout<<"\n\n\tWhich WEBCAM you want to purchase\t";
cin>>web;
if(web==1)
{
aweb=1500;
}
else if(web==2)
{
aweb=6000;
}
else if(web==3)
{
aweb=12000;
}
else if(web==0)
{
goto items;
}
else if(web!=1||web!=2||web!=3)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto mun;
}
cout<<"\n\n\tWEBCAM(MAX 5):\t ";
cin>>p;
if(p>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
getch();
goto items;
}
else
amun=1000-p;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==5)
{
park:;
clrscr();
cout<<"\n\n\t\t\t\tGRAPHIC CARD\n\n";
cout<<"\n ITEMS\t\t\t\t\tRATE\n";
cout<<"\n 1. 32 bit\t\t\t\t\t5000\n";
cout<<" 2. 64 bit\t\t\t\t\t8000\n";
cout<<"\n\n\tWhich GRAPHIC CARD you want to purchase\t";
cin>>g1;
if(g1==1)
{
graph=5000;
}
else if(g1==2)
{
graph=8000;
}
else if(g1==0)
{
goto items;
}
else if(g1!=1||g1!=2)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto park;
}
cout<<"\n\tGRAPHIC CARD(MAX 5):\t ";
cin>>q;
if(q>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
getch();
goto items;
}
else
aperk=500-q;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==6)
{
coco:;
clrscr();
cout<<"\n\n\t\t\t\tRAM\n\n";
cout<<"\n ITEMS\t\t\t\t\tRATE\n";
cout<<"\n 1. 1GB\t\t\t\t\t2000\n";
cout<<" 2. 2GB\t\t\t\t\t4000\n";
cout<<"\n\n\tWhich RAM you want to purchase\t";
cin>>r1;
if(r1==1)
{
ram=2000;
}
else if(r1==2)
{
ram=4000;
}
else if(r1==0)
{
goto items;
}
else if(r1!=1||r1!=2)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto coco;
}
cout<<"\n\tRAM(MAX 2): ";
cin>>r;
if(r>2)
{
cout<<"\n\n\tEnter Quantity Smaller than 2";
getch();
goto items;
}
else
acoc=400-r;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==7)
{
titan:;
clrscr();
cout<<"\n\n\t\t\t\tHARD DISK\n\n";
cout<<"\n ITEMS\t\t\t\t\tRATE\n";
cout<<"\n 1. 20GB\t\t\t\t\t1500\n";
cout<<" 2. 50GB\t\t\t\t\t2000\n";
cout<<" 3. 80GB\t\t\t\t\t3000\n";
cout<<" 4. 160GB\t\t\t\t\t5000\n";
cout<<" 5. 320GB\t\t\t\t\t8000\n";
cout<<"\n\n\tWhich HARD DISK you want to purchase\t";
cin>>h1;
if(h1==1)
{
hard=1500;
}
else if(h1==2)
{
hard=2000;
}
else if(h1==3)
{
hard=3000;
}
else if(h1==4)
{
hard=5000;
}
else if(h1==5)
{
hard=8000;
}
else if(h1==0)
{
goto items;
}
else if(h1!=1||h1!=2||h1!=3||h1!=4||h1!=5)
{
cout<<"\n\n\tOOPS!!!!!!! Wrong choice\n\n";
getch();
goto titan;
}
cout<<"\n\tHARD DISK(MAX 5):\t ";
cin>>s;
if(s>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
getch();
goto items;
}
else
atit=100-s;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{
clrscr();
goto cash;
}
}
if(choice==8)
{
lux:;
clrscr();
cout<<"\n\n\t\t\t\tWINDOWS ORIGINAL CD'S\n\n";
cout<<"\n ITEMS\t\t\t\tRATE\n";
cout<<"\n 1. 98\t\t\t\t\t1500\n";
cout<<" 2. 2000\t\t\t\t2000\n";
cout<<" 3. XP\t\t\t\t\t4000\n";
cout<<" 4. VISTA\t\t\t\t8000\n";
cout<<" 5. windows7\t\t\t\t11000\n";
cout<<"\n\n\tWhich WINDOWS CD you want to purchase\t";
cin>>w1;
if(w1==1)
{
win=1500;
}
else if(w1==2)
{
win=2000;
}
else if(w1==3)
{
win=4000;
}
else if(w1==4)
{
win=8000;
}
else if(w1==5)
{
win=11000;
}
else if(w1==0)
{
goto items;
}
else if(w1!=1||w1!=2||w1!=3||w1!=4||w1!=5)
{
cout<<"\n\n\tOOPS!!!!!!!Wrong choice\n\n";
getch();
goto lux;
}
cout<<"\n\tWINDOWS ORIGINAL CD(MAX 5):\t ";
cin>>t;
if(t>5)
{
cout<<"\n\n\tEnter Quantity Smaller than 5";
getch();
goto items;
}
else
alux=1000-t;
cout<<"\n\tDO you want to purchase more(y/n)";
cin>>yes;
if(yes=='y')
{
clrscr();
goto items;
}
else
{