[ create a new paste ] login | about

Link: http://codepad.org/5mwog7TM    [ raw code | output | fork ]

C++, pasted on Sep 6:
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
#include<conio.h>
#include<iostream.h>
#include<stdlib.h>
#include<string.h>
#include<fstream.h>
//#include<graphics.h>




void record();
void search();
void pnr_search();
int choice,i=0,a,j,f,k;
int chk=0;
char r,ch,c;
int count=0;
char name[15],pr[8];
const int size=6;
char cnfrm[7];
double isl=22000,lhe=20000,khi=12000;
struct twikid
{
	 char day[10];
	 int d;
	 int m;
	 int y;
	 char from[15];
	 char to[15];
	 char time[20];
	 char clas[15];
	 char fname[15];
	 char lname[15];
	 char ppt_no[15];
	 char cont[15];
	 char meal[10];
	 char type[10];
	 int seat;
	 long double adult;
	 long double child;
	 long double infant;
	 char prefix[7];
	 int bd;
	 int bm;
	 int by;
	 int ed;
	 int em;
	 int ey;
	 char rdate[15];
	 long double price;
	 char pnr[8];
	 char tkt[8];
	  long double tprice;
	  long double tax;
	  long double amount;

}p1[20];

	  // ofstream thefile("ID.txt");
		  void gen_ren(char *s, const int len) {
	 static const char alphanum[] =
		  "0123456789"
		  "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

	 for (  k = 0; k < len; ++k) {
		  s[k] = alphanum[rand() % (sizeof(alphanum) - 1)];
	 }
	 s[len] = 0;
	  }
	 void tkt_num(char *s, const int ben) {
	 static const char alphanum[] =
		  "0123456789";

	 for ( k = 0; k < ben; ++k) {
		  s[k] = alphanum[rand() % (sizeof(alphanum) - 1)];
	 }

	 s[ben] = 0;
}
	 // void cinfo()
		 //	{
			//   gen_ren(captcha,size);
		  //	cout<<captcha<<"\n\nEnter this captcha to confirm your reservation : ";
		 //	cin>>cnfrm;

		 //	}





void menu()
{



			clrscr();
			cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\tWelcome to the Twikid Airline";
			cout<<"\n\n\t\t\t*********************************\n";
			cout<<"\t\t\tPress 1\t to Enter a New Record\n";
			cout<<"\t\t\tPress 2\t to Remove Record\n";
			cout<<"\t\t\tPress 3\t to Search by Name\n";
			cout<<"\t\t\tPress 4\t to Search by PNR Number\n";
			cout<<"\t\t\tPress 5\t to View all Record\n";
			cout<<"\t\t\tPress 6\t to Input data from File\n";
			cout<<"\t\t\tPress 7\t to Exit\n";
			cout<<"\t\t\t*********************************\n";










				}


	int main()
	{       //textbackground(1);
			  //textcolor(2);
			clrscr();

	p1[i].adult=0;
	p1[i].child=0;
	p1[i].infant=0;
	int in;
    do{
	menu();



	if(getch()=='1')
	{
	do
	{  clrscr();
	record();
	i++;
	cout<<"\n\nPress 'r' for more entry or any other key to exit";
	}
	while(getch()=='r');
	}
	if(getch()=='2')
	k=1;
	  for(j=0;j<k;j++)
	  {
		search();
		if(chk=1)
		{
		 k++;

		}
		else
		cout<<"\n\nPress y to confirm or any other key to exit";
		if(getch()=='y')
		{
	  p1[i].day=="00";
	  p1[i].d=00;
	  p1[i].m=00;
	  p1[i].y=00;
	  p1[i].from=="Nil";
	  p1[i].to=="00";
	  p1[i].time=="00";
	  p1[i].clas=="00";
	  p1[i].fname=="00";
	  p1[i].lname=="00";
	  p1[i].ppt_no=="00";
	  p1[i].cont=="00";
	  p1[i].meal=="00";
	  p1[i].type=="00";
	  p1[i].seat=00;
	  p1[i].adult=00;
	  p1[i].child=00;
	  p1[i].infant=00;
	  p1[i].prefix=="00";
	  p1[i].bd=00;
	  p1[i].bm=00;
	  p1[i].by=00;
	  p1[i].ed=00;
	  p1[i].em=00;
	  p1[i].ey=00;
	  p1[i].rdate=="00";
	  p1[i].price=00;

	  p1[i].pnr=="00";
	  p1[i].tkt=="00";
	  p1[i].tprice=00;
	  p1[i].tax=00;
	  p1[i].amount=00;
	cout<<"\n\n\n\n\t\t\tRecord is removed!!";

		}
      }

		if(getch()=='3')
		{
		 search();
		}
		if(getch()=='4')
		{
		 pnr_search();
		}

	//char a;
	//ifstream infile("rule.txt");
	//while(infile.get(a)!=0)
	//cout<<a;


		cout<<"\n\nPress 'm' to return to Main menu";
		}
		while(getch()=='m');



		}
		void record()
		{
	  cout<<"\n\n\n\nOur flight are available in;\n\n1:Islamabad\n2:Karachi\n3:Lahore\n4:Dubai\n\n\t\t\tPress Enter to Proceed\n\n";
	  getch();
		clrscr();
	  k=1;
	  for(j=0;j<k;j++)
	  {
	  cout<<"\n\n\nChoose your flight\n\nPress 1 for Islamabad to Dubai\nPress 2 for Karachi to Dubai\nPress 3 for Lahore to Dubai\n\n";
	  if(getch()=='1')
		 {
		 strcpy(p1[i].from,"Islamabad");
		  strcpy(p1[i].to,"Dubai");
		  p1[i].price=isl;
		 }
			else if(getch()=='2')
		 {
		 strcpy(p1[i].from,"Karachi");
		  strcpy(p1[i].to,"Dubai");
		  p1[i].price=khi;
		 }
			else if(getch()=='3')
		 {
		 strcpy(p1[i].from,"Lahore");
		  strcpy(p1[i].to,"Dubai");
		  p1[i].price=lhe;
		 }
			else
			{
				 k++;
			cout<<"\t\tInvalid Entry!!  Try again...";
			}

		  }





	  cout<<"\n\nWhen do you want to travel?\nEnter Day!!  ";
	  cin.get(p1[i].day,10);
	  cin.ignore();
	  while(p1[i].y<2011)
	  {
	  cout<<"\n\nEnter Date : \ne.g(dd-mm-yyyy)\n\n";
	  cin>>p1[i].d>>ch>>p1[i].m>>ch>>p1[i].y;
	  cin.ignore();
			if (p1[i].d<1 || p1[i].d>31)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(p1[i].m<1 || p1[i].m>12)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(p1[i].y<2011)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
	  }
		k=1;
	  for(j=0;j<k;j++)
	  {
	  cout<<"\n\nPress 1 for Return and 2 for One way : ";
	  if(getch()=='1')
		{
			strcpy(p1[i].type,"Return");
			p1[i].price=p1[i].price+(p1[i].price*60/100);
			cout<<"\n\nEnter Return Date : ";
			cin.get(p1[i].rdate,15);
			cin.ignore();

		}
			else if(getch()=='2')
			strcpy(p1[i].time,"One Way");
			else
			{
			k++;
		  cout<<"\t\tInvalid Entry!!  Try again...";
		  }
		}
			 k=1;
	  for(j=0;j<k;j++)
	  {
	  cout<<"\n\nTwo flights are available on "<<p1[i].day<<" from "<<p1[i].from<<" to "<<p1[i].to<<"\nWhen do you want to travel??\n\nPress 1 for Morning at 0800\n\nPress 2 for Evening at 1700\n\n";
	  if(getch()=='1')
			strcpy(p1[i].time,"Morning at 0800");
			else if(getch()=='2')
		  strcpy(p1[i].time,"Evening at 1700");
			else
			{
				k++;
		  cout<<"\t\tInvalid Entry!!  Try again...";
			}
		}
           k=1;
	  for(j=0;j<k;j++)
	  {
		  cout<<"\n\nChoose your Class :\nPress 1 for Economy class\nPress 2 for Lower Economy Class class\nPress 3 for Business class\n\n";
		 if(getch()=='1')
			strcpy(p1[i].clas, "Economy Class");
			else if(getch()=='2')
		{
		  strcpy(p1[i].clas,"Lower Economy Class");
		  p1[i].price=p1[i].price*80/100;
		}
			else if(getch()=='3')
		 {
		  strcpy(p1[i].clas,"Business Class");
		  p1[i].price=p1[i].price+(p1[i].price*80/100);
		 }
			else
			{
				k++;
		  cout<<"\t\tInvalid Entry!!  Try again...";
			}
		 }

	  cout<<"How many seats you want to reserve? ";
	  int adult,child,infant;
	  cin>>p1[i].seat;
	  cout<<"Adults : ";
	  cin>>adult;
	  cout<<"Childrens : ";
	  cin>>child;
	  cout<<"Infants : ";
	  cin>>infant;
		 clrscr();
		 cout<<"Seats are Available";
		 cout<<"\n\n\n\nEconomy Class 	       :\t 7 Seats are available";
		 cout<<"\n\nLower Economy Class     :\t 9 Seats are available";
		 cout<<"\n\nBusiness Class	       :\t 4 Seats are available";
		 p1[i].adult=adult*p1[i].price;
		 p1[i].child=child*(p1[i].price*60/100);
		 p1[i].infant=infant*(p1[i].price*25/100);
		 p1[i].tprice=p1[i].adult+p1[i].child+p1[i].infant;
		 p1[i].tax=p1[i].tprice*21/100;
		 p1[i].amount=p1[i].tprice+p1[i].tax;
		 clrscr();
		 cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t"<<adult<<" Adults : "<<p1[i].adult<<"\n\n\t\t\t"<<child<<" Child : "<<p1[i].child<<"\n\n\t\t\t"<<infant<<" Infants : "<<p1[i].infant<<"\n\n\t\t\tNet Amount : "<<p1[i].tprice<<"\n\n\t\t\tTax : "<<p1[i].tax<<"\n\n\t\t\t Total Amount : "<<p1[i].amount;
		 cout<<"\n\n\t\t\tPress Enter to Proceed";
		 getch();
		 clrscr();
	 for(j=0;j<p1[i].seat;j++)
	 {
		 cout<<"\n\nPrefix\n\nMr. \Mrs. \Ms. \Miss. \Child. \Infant\n\nEnter here : ";
		 cin>>p1[i].prefix;
		 cin.ignore();
		 cout<<"\nEnter Your First Name : ";
		 cin.get(p1[i].fname,15);
		 cin.ignore();
		 cout<<"\nEnter Your Last Name : ";
		 cin.get(p1[i].lname,15);
		 cin.ignore();
		 while(p1[i].by>2011 || p1[i].by<1920)
	  {
	  cout<<"Enter date of Birth : \ne.g(dd-mm-yyyy)\n\n";
	  cin>>p1[i].bd>>ch>>p1[i].bm>>ch>>p1[i].by;
	  cin.ignore();
			if (p1[i].bd<1 || p1[i].bd>31)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(p1[i].bm<1 || p1[i].bm>12)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(p1[i].by>2011 || p1[i].by<1920)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
	  }
		 cout<<"Enter Your Passport Number : ";
		 cin.get(p1[i].ppt_no, 15);
		 cin.ignore();
		 while(p1[i].ey<2013)
	  {
	  cout<<"Enter Passport Expiry date : \ne.g(dd-mm-yyyy)\n\n";
	  cin>>p1[i].ed>>ch>>p1[i].em>>ch>>p1[i].ey;
	  cin.ignore();
			if (p1[i].ed<1 || p1[i].ed>31)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(p1[i].em<1 || p1[i].em>12)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(p1[i].ey<1920)
			cout<<"\n\t!! Error, Logical Error.. !!";
			else if(p1[i].ey<2011 || p1[i].ey>2020)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
	  }
		 cout<<"Enter Your Contact #  ";
		 cin.get(p1[i].cont,15);
		 cin.ignore();
       k=1;
	  for(j=0;j<k;j++)
	  {
		 cout<<"Choose your Meal type\n\nPress 1 for Veg\nPress 2 for Non-Veg\nPress 3 for Baby Food\n";
		 if(getch()=='1')

		 strcpy(p1[i].meal,"Veg");
			else if(getch()=='2')
		 strcpy(p1[i].meal,"Non-Veg");
			else if(getch()=='3')
		 strcpy(p1[i].meal,"Baby Food");
			else
			{
			 k++;
		  cout<<"\t\tInvalid Entry!!  Try again...";
			}
		}
		 clrscr();
		 cout<<"\n\nDay : "<<p1[i].day<<"\nFlight Date : "<<p1[i].d<<ch<<p1[i].m<<ch<<p1[i].y<<"\nFlight Type : "<<p1[i].type<<"\nReturn Date : "<<p1[i].rdate<<"\nDeparture Place : "<<p1[i].from<<"\nDestination : "<<p1[i].to<<"\nClass Type : "<<p1[i].clas<<"\nTime of Flight : "<<p1[i].time<<"\nTitle : "<<p1[i].prefix<<"\nFirst Name : "<<p1[i].fname<<"\nLast Name : "<<p1[i].lname<<"\nDate of Birth : "<<p1[i].bd<<ch<<p1[i].bm<<ch<<p1[i].by<<"\nPassport Number : "<<p1[i].ppt_no<<"\nExpiry Date : "<<p1[i].ed<<ch<<p1[i].em<<ch<<p1[i].ey<<"\n Contact Number : "<<p1[i].cont<<"\nMeal Type : "<<p1[i].meal<<"\n\n";
		 cout<<"\n\nPress y to confirm or n to modify : ";
		 if(getch()=='y')
		 {
		 clrscr();
			gen_ren(p1[i].pnr,size);
			cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\tYour PNR Number is : "<<p1[i].pnr<<endl;
			cout<<"\n\n\n\t\t\tWould you like to book a ticket?\n\n\t\tPress y to proceed or any other key to exit";
		  }

		  if(getch()=='y')
		  {
		  clrscr();

		 cout<<"\n\nChoose Your Paymet method\n\nPress 1 for Credit Card\nPress 2 for Cash : ";
		 }


		 if(getch()=='1')
			{
				clrscr();
					 char cnum[18];
			int cvv;
			int dbd,dbm,dby;
			cout<<"\nEnter Name : ";
		 cin.get(name,15);
		 cin.ignore();
		 while(dby>2011 || dby<1920)
	  {
	  cout<<"Enter date of Birth : \ne.g(dd-mm-yyyy)\n\n";
	  cin>>dbd>>ch>>dbm>>ch>>dby;
	  cin.ignore();
			if (dbd<1 || dbd>31)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(dbm<1 || dbm>12)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(dby>2011 || dby<1920)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else
			cout<<" ";
	  }
		 while(count!=16)
		 {
			cout<<"\n\nEnter 16 digit credit card number : ";
			cin>>cnum;
			for(count=0;cnum[count]!='\0';count++)
			cout<<" ";
			if(count!=16)
			cout<<"\n\t!! Error, Sorry you have entered invalid number, please try again.. !!";
		 }
			cout<<"\n\nEnter cvv num : ";
			cin>>cvv;
			int dd,mm,yy;
			while(yy<2013)
	  {
	  cout<<"Enter Card Expiry date : \ne.g(dd-mm-yyyy)\n\n";
	  cin>>dd>>ch>>mm>>ch>>yy;
	  cin.ignore();
			if (dd<1 || dd>31)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(mm<1 || mm>12)
			cout<<"\n\t!! Error, Sorry you have entered invalid date, please try again.. !!";
			else if(yy<1920)
			cout<<"\n\t!! Error, Logical Error.. !!";
			else if(yy<2013)
			cout<<"\n\t!! Error, Sorry We can not accpet the card of this Expiry.. !!";
			else
			cout<<" ";



	 }
	 }
			else if(getch()=='2')
			break;
			else
			{
			clrscr();
			cout<<"\n\n\t\t!!Invalid Entry!!";
			}

		  }

			cout<<"\n\nPress y to confirm or any other key to exit : ";

		  if(getch()=='y')
		  {
			clrscr();
				cout<<"\n\n\n\n\n\t\tThe Amount of "<<p1[i].amount<<" is received\n\n\t\tPress any key to see ticket Number :";
				getch();
		  tkt_num(p1[i].tkt,size);
			cout<<"\n\n\n\t\tYour ticket Number is : "<<p1[i].tkt<<endl;
			}





		 // ofstream thefile("ID.txt" , ios::app);

		// thefile<<"\n\nDay : "<<p1[i].day<<"\nFlight Date : "<<p1[i].date<<"\nFlight Type : "<<p1[i].type<<"\nReturn Date : "<<p1[i].rdate<<"\nDeparture Place : "<<p1[i].from<<"\nDestination : "<<p1[i].to<<"\nClass Type : "<<p1[i].clas<<"\nTime of Flight : "<<p1[i].time<<"\nTitle : "<<p1[i].prefix<<"\nFirst Name : "<<p1[i].fname<<"\nLast Name : "<<p1[i].lname<<"\nDate of Birth : "<<p1[i].dob<<"\nPassport Number : "<<p1[i].ppt_no<<"\nExpiry Date : "<<p1[i].edate<<"\n Contact Number : "<<p1[i].cont<<"\nMeal Type : "<<p1[i].meal<<"\n\n------------------------------";

	//  ofstream thefile("ID.txt" , ios::app);
	 //	thefile<<"\n\n\n\nTotal Amount : "<<p1[i].amount;
getch();
		}

			void search()
			{

		 cout<<"\n\nEnter First Name to Search the data : ";
		 cin>>name;
		 for(count=0;name[count]!='\0';count++)
		 cout<<" ";


		for(i=0;i<20;i++)
			 {
		  while(name[f]!='\0')
		  {

		 if(name[f]==p1[i].fname[f])
		 {
			f++;
			cout<<" ";

		 }
		 else
		 break;
		 }
		 if(f==count)
		 {
		 clrscr();
		 cout<<"\n\nDay : "<<p1[i].day<<"\nFlight Date : "<<p1[i].d<<ch<<p1[i].m<<ch<<p1[i].y<<"\nFlight Type : "<<p1[i].type<<"\nReturn Date : "<<p1[i].rdate<<"\nDeparture Place : "<<p1[i].from<<"\nDestination : "<<p1[i].to<<"\nClass Type : "<<p1[i].clas<<"\nTime of Flight : "<<p1[i].time<<"\nTitle : "<<p1[i].prefix<<"\nFirst Name : "<<p1[i].fname<<"\nLast Name : "<<p1[i].lname<<"\nDate of Birth : "<<p1[i].bd<<ch<<p1[i].bm<<ch<<p1[i].by<<"\nPassport Number : "<<p1[i].ppt_no<<"\nExpiry Date : "<<p1[i].ed<<ch<<p1[i].em<<ch<<p1[i].ey<<"\n Contact Number : "<<p1[i].cont<<"\nMeal Type : "<<p1[i].meal<<"\n\n";
		 break;
		 }
		 else
		 {
		 chk=1;
		  f=0;
		  }
		 }
			 if(chk=1)
		  cout<<"\n\n\t\tSorry Record not found  Try again...";

		}


		void pnr_search()
			{       f=0;

		 cout<<"Enter PNR to Search the data : ";
		 cin>>pr;
		 for(count=0;pr[count]!='\0';count++)
		 cout<<" ";


		for(i=0;i<20;i++)
			 {
		  while(pr[f]!='\0')
		  {

		 if(pr[f]==p1[i].pnr[f])
		 {
			f++;
			cout<<" ";

		 }
		 else
		 break;
		 }
		 if(f==count)
		 {
		 clrscr();
		 cout<<"\n\nDay : "<<p1[i].day<<"\nFlight Date : "<<p1[i].d<<ch<<p1[i].m<<ch<<p1[i].y<<"\nFlight Type : "<<p1[i].type<<"\nReturn Date : "<<p1[i].rdate<<"\nDeparture Place : "<<p1[i].from<<"\nDestination : "<<p1[i].to<<"\nClass Type : "<<p1[i].clas<<"\nTime of Flight : "<<p1[i].time<<"\nTitle : "<<p1[i].prefix<<"\nFirst Name : "<<p1[i].fname<<"\nLast Name : "<<p1[i].lname<<"\nDate of Birth : "<<p1[i].bd<<ch<<p1[i].bm<<ch<<p1[i].by<<"\nPassport Number : "<<p1[i].ppt_no<<"\nExpiry Date : "<<p1[i].ed<<ch<<p1[i].em<<ch<<p1[i].ey<<"\n Contact Number : "<<p1[i].cont<<"\nMeal Type : "<<p1[i].meal<<"\n\n";
		 break;
		 }
		 else
		 {
		 chk=1;
		  f=0;
		  }
		 }
          if(chk=1)
		  cout<<"\n\n\t\tSorry Record not found  Try again...";

		}


Output:
1
2
3
4
Line 17: error: conio.h: No such file or directory
In function 'void menu()':
Line 97: error: 'clrscr' was not declared in this scope
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: