SlideShare a Scribd company logo
1 of 15
Project title:”TRAIN TICKET RESERVATION CENTER”
Your name :”RIDA BILGRAMI"| Your teacher’s name :”MISS MAHRUKH
MAZHARI”| Your Field:” B.C.S (IST SEMESTER)”
#include<stdio.h>
#include<conio.h>
#include<string.h>
char manue(void);
#define DESTINY printf("nnttt"PLEASE ENTER YOUR DESTINY WHERE YOU WANT
TO GO:"nn")printf("nnttt"PRESS 'F' or 'f' for
FAISALABAD"nn")printf("nnttt"PRESS 'L' or 'l' for
LAHORE"nn")printf("nnttt"PRESS 'P' or 'p' for
PESHAWAR"nn")scanf("%c",&des[1])des[1]=getchar()switch(des[1]){
#define SERVICE printf("nnttt"WE WILL SERVE YOU OUR BEST SERVICE"nn");
#define PERSONS printf("PLEASE ENTER NUMBER OF PERSONS WANTS TO GO")
scanf("%d",&per);
#define DEPARTURE printf("nnttt"YOUR'S DEPARTURE TIME IS AT 2:00 PM:"nn");
#define MEALEXPENSE printf("nnttt"YOUR TOTAL MEAL EXPENSE IS %dRs/-
only"nn",me);
#define TOTALEXPENSE printf("nnttt"YOUR TOTAL EXPENSE IS %dRs/-
only"nn",te)break;
#define ERROR default:printf("nnnttttERROR!!!...nnn");
#define ENTERYS int nic[]int pchar name[]printf("nnntttenter your nic number
:n")scanf("%d",&nic[])printf("nnntttenter NAME :n")scanf("%s",&name[]
)printf(“nnnttenter the
destinynn”)scanf(“%s”,des[1])for(p=1;p<=name[];p++){printf("nnttYOUR SEAT
NUMBER IS %d",p)printf("nnnttt Your Seat has Reserved .. nthank you for reserving
with us nn")for(p=1;p<=20;p++){printf("tx03")}
void main(void)
{
int i;
char j=1,k=4;
char ch=getchar();
clrscr();
for(i=1;i<=80;i++)
{
printf("t%ct%c",j,k);
}
printf("nntt******xcdxcdWELCOME TO TRAIN TICKET RESERVATION
SYSTEMxcdxcd******tttn");
printf("nnttt: :*@*@ A WAY TO FACILITATE YOU...@*@*::ttt");
printf("nnttt DESIGNED AND CODED BY ..nnnntttxcdxcdxcd RIDA SARWAR
BILGRAMI , RABIA , AFRA & GULAFSHANxcdxcdxcdnn");
for(i=1;i<=80;i++)
{
printf("t%ct%c",j,k);
}
printf("press any alpha key to continue....");
scanf("%c",&ch);
if(getchar()<=122)
{
manue();
}
else
printf("you entered invalid key.......");
getch();
}
char manue(void)
{
char c=getchar();
char des=getchar();
char reg[3];
int per,me,te=0;
printf("nnttxbcxbcxbc ** MAIN MANUE ** xbcxbcxbcttt");
printf("nnttxcdxcdxcd "RESERVE A SEAT IN YOUR'S CHOICE
CLASS:"xcdxcdxcdttnn");
printf("nnttt ** xcdxcdxcd ** MAKE YOUR OWN CHOICE ** xcdxcdxcd **");
printf("nnttt PRESS 'B' or 'b' for:"COMPLETE YOUR SEAT RESERVATION IN
BUISNESS CLASS"nntt");
printf("nnttt PRESS 'E' or 'e' for:"COMPLETE YOUR SEAT RESERVATION IN
ECONOMY CLASS"nntt");
scanf("%c",&c);
switch(c)
{
case 'b':
case 'B':
DESTINY
case 'F':
case 'f':
SERVICE
printf("nnttt"YOUR TICKET PRICE IS 4000/-"nn");
PERSONS
printf("nnttt"YOUR'S DESTINY DURATION IS 15 HOURS:"nn");
DEPARTURE
printf("nnttt WE WILL SERVE YOU:"Hi-Tea=300/-only"tt"Dinner=500/
only"tt"Breakfast=300/-only"nn");
me=per*1100;
MEALEXPENSE
te=(4000*per)+me;
TOTALEXPENSE
case 'L':
case 'l':
SERVICE
printf("nnttt"YOUR TICKET PRICE IS 4500/-"nn");
PERSONS
printf("nnttt"YOUR'S DESTINY DURATION IS 17 HOURS:"nn");
DEPARTURE
printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=300/-only"tt"Dinner=500/-
only"tt"Breakfast=300/-only"nn");
me=per*1100;
MEALEXPENSE
te=(4500*per)+me;
TOTALEXPENSE
case 'P':
case 'p':
SERVICE
printf("nnttt"YOUR TICKET PRICE IS 6000/-"nn");
PERSONS
printf("nnttt"YOUR'S DESTINY DURATION IS 25 HOURS:"nn");
DEPARTURE
printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=300/-only"tt"Dinner=500/-
only"tt"Breakfast=300/-only"tt"Lunch=500/-only"nn");
me=per*1600;
MEALEXPENSE
te=(6000*per)+me;
TOTALEXPENSE
ERROR
ENTERYS
manue();
break;
}
break;
case 'e':
case 'E':
DESTINY
case 'F':
case 'f':
SERVICE
printf("nnttt"YOUR TICKET PRICE IS 1000/-"nn");
PERSONS
printf("nnttt"YOUR'S DESTINY DURATION IS 15 HOURS"nn");
DEPARTURE
printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=100/-only"tt"Dinner=200/-
only"tt"Breakfast=100/-only"nn");
me=per*400;
MEALEXPENSE
te=(1000*per)+me;
TOTALEXPENSE
case 'L':
case 'l':
SERVICE
printf("nnttt"YOUR TICKET PRICE IS 1100/-"nn");
PERSONS
printf("nnttt"YOUR'S DESTINY DURATION IS 17 HOURS:"nn");
DEPARTURE
printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=100/-only"tt"Dinner=200/-
only"tt"Breakfast=100/-only"nn");
me=per*400;
MEALEXPENSE
te=(1100*per)+me;
TOTALEXPENSE
case 'P':
case 'p':
SERVICE
printf("nnttt"YOUR TICKET PRICE IS 1600/-"nn");
PERSONS
printf("nnttt"YOUR'S DESTINY DURATION IS 25 HOURS:"nn");
DEPARTURE
printf("nnttt"WE WILL SERVE YOU:Hi-Tea=100/-only"tt"Dinner=200/
only"tt"Breakfast=100/-only"tt"Lunch=200/-only"nn");
me=per*600;
MEALEXPENSE
te=(1600*per)+me;
TOTALEXPENSE
ERROR
ENTERYS
manue();
break;
}
break;

More Related Content

Similar to RIDA PROJECT

Recursive descent parsing
Recursive descent parsingRecursive descent parsing
Recursive descent parsing
Boy Baukema
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
vinay arora
 
The java program that display a menu of choices and p.pdf
   The java program that display a menu of choices  and p.pdf   The java program that display a menu of choices  and p.pdf
The java program that display a menu of choices and p.pdf
annaistrvlr
 

Similar to RIDA PROJECT (20)

symbols of Latex.pdf
symbols of Latex.pdfsymbols of Latex.pdf
symbols of Latex.pdf
 
Latex Symbols.pdf
Latex Symbols.pdfLatex Symbols.pdf
Latex Symbols.pdf
 
Hangman Game Programming in C (coding)
Hangman Game Programming in C (coding)Hangman Game Programming in C (coding)
Hangman Game Programming in C (coding)
 
Recursive descent parsing
Recursive descent parsingRecursive descent parsing
Recursive descent parsing
 
La tex symbols
La tex symbolsLa tex symbols
La tex symbols
 
Numerical Methods in C
Numerical Methods in CNumerical Methods in C
Numerical Methods in C
 
week-6x
week-6xweek-6x
week-6x
 
06 1 조건문
06 1 조건문06 1 조건문
06 1 조건문
 
Elf文件解析
Elf文件解析Elf文件解析
Elf文件解析
 
Symbols
SymbolsSymbols
Symbols
 
La tex symbols
La tex symbolsLa tex symbols
La tex symbols
 
Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collection
 
Presentation1
Presentation1Presentation1
Presentation1
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
 
Yg byev2e
Yg byev2eYg byev2e
Yg byev2e
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
Random. Kinda.
Random. Kinda.Random. Kinda.
Random. Kinda.
 
The java program that display a menu of choices and p.pdf
   The java program that display a menu of choices  and p.pdf   The java program that display a menu of choices  and p.pdf
The java program that display a menu of choices and p.pdf
 
py_AutoMapMaker
py_AutoMapMakerpy_AutoMapMaker
py_AutoMapMaker
 
Ads
AdsAds
Ads
 

RIDA PROJECT

  • 1. Project title:”TRAIN TICKET RESERVATION CENTER” Your name :”RIDA BILGRAMI"| Your teacher’s name :”MISS MAHRUKH MAZHARI”| Your Field:” B.C.S (IST SEMESTER)”
  • 2. #include<stdio.h> #include<conio.h> #include<string.h> char manue(void); #define DESTINY printf("nnttt"PLEASE ENTER YOUR DESTINY WHERE YOU WANT TO GO:"nn")printf("nnttt"PRESS 'F' or 'f' for FAISALABAD"nn")printf("nnttt"PRESS 'L' or 'l' for LAHORE"nn")printf("nnttt"PRESS 'P' or 'p' for PESHAWAR"nn")scanf("%c",&des[1])des[1]=getchar()switch(des[1]){ #define SERVICE printf("nnttt"WE WILL SERVE YOU OUR BEST SERVICE"nn"); #define PERSONS printf("PLEASE ENTER NUMBER OF PERSONS WANTS TO GO") scanf("%d",&per); #define DEPARTURE printf("nnttt"YOUR'S DEPARTURE TIME IS AT 2:00 PM:"nn"); #define MEALEXPENSE printf("nnttt"YOUR TOTAL MEAL EXPENSE IS %dRs/- only"nn",me); #define TOTALEXPENSE printf("nnttt"YOUR TOTAL EXPENSE IS %dRs/- only"nn",te)break;
  • 3. #define ERROR default:printf("nnnttttERROR!!!...nnn"); #define ENTERYS int nic[]int pchar name[]printf("nnntttenter your nic number :n")scanf("%d",&nic[])printf("nnntttenter NAME :n")scanf("%s",&name[] )printf(“nnnttenter the destinynn”)scanf(“%s”,des[1])for(p=1;p<=name[];p++){printf("nnttYOUR SEAT NUMBER IS %d",p)printf("nnnttt Your Seat has Reserved .. nthank you for reserving with us nn")for(p=1;p<=20;p++){printf("tx03")} void main(void) { int i; char j=1,k=4; char ch=getchar(); clrscr();
  • 4. for(i=1;i<=80;i++) { printf("t%ct%c",j,k); } printf("nntt******xcdxcdWELCOME TO TRAIN TICKET RESERVATION SYSTEMxcdxcd******tttn"); printf("nnttt: :*@*@ A WAY TO FACILITATE YOU...@*@*::ttt"); printf("nnttt DESIGNED AND CODED BY ..nnnntttxcdxcdxcd RIDA SARWAR BILGRAMI , RABIA , AFRA & GULAFSHANxcdxcdxcdnn"); for(i=1;i<=80;i++) { printf("t%ct%c",j,k); }
  • 5. printf("press any alpha key to continue...."); scanf("%c",&ch); if(getchar()<=122) { manue(); } else printf("you entered invalid key......."); getch(); }
  • 6. char manue(void) { char c=getchar(); char des=getchar(); char reg[3]; int per,me,te=0; printf("nnttxbcxbcxbc ** MAIN MANUE ** xbcxbcxbcttt"); printf("nnttxcdxcdxcd "RESERVE A SEAT IN YOUR'S CHOICE CLASS:"xcdxcdxcdttnn"); printf("nnttt ** xcdxcdxcd ** MAKE YOUR OWN CHOICE ** xcdxcdxcd **"); printf("nnttt PRESS 'B' or 'b' for:"COMPLETE YOUR SEAT RESERVATION IN BUISNESS CLASS"nntt"); printf("nnttt PRESS 'E' or 'e' for:"COMPLETE YOUR SEAT RESERVATION IN ECONOMY CLASS"nntt");
  • 7. scanf("%c",&c); switch(c) { case 'b': case 'B': DESTINY case 'F': case 'f': SERVICE printf("nnttt"YOUR TICKET PRICE IS 4000/-"nn"); PERSONS printf("nnttt"YOUR'S DESTINY DURATION IS 15 HOURS:"nn"); DEPARTURE
  • 8. printf("nnttt WE WILL SERVE YOU:"Hi-Tea=300/-only"tt"Dinner=500/ only"tt"Breakfast=300/-only"nn"); me=per*1100; MEALEXPENSE te=(4000*per)+me; TOTALEXPENSE case 'L': case 'l': SERVICE printf("nnttt"YOUR TICKET PRICE IS 4500/-"nn"); PERSONS printf("nnttt"YOUR'S DESTINY DURATION IS 17 HOURS:"nn"); DEPARTURE
  • 9. printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=300/-only"tt"Dinner=500/- only"tt"Breakfast=300/-only"nn"); me=per*1100; MEALEXPENSE te=(4500*per)+me; TOTALEXPENSE case 'P': case 'p': SERVICE printf("nnttt"YOUR TICKET PRICE IS 6000/-"nn"); PERSONS printf("nnttt"YOUR'S DESTINY DURATION IS 25 HOURS:"nn"); DEPARTURE
  • 10. printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=300/-only"tt"Dinner=500/- only"tt"Breakfast=300/-only"tt"Lunch=500/-only"nn"); me=per*1600; MEALEXPENSE te=(6000*per)+me; TOTALEXPENSE ERROR ENTERYS manue(); break; } break;
  • 11. case 'e': case 'E': DESTINY case 'F': case 'f': SERVICE printf("nnttt"YOUR TICKET PRICE IS 1000/-"nn"); PERSONS printf("nnttt"YOUR'S DESTINY DURATION IS 15 HOURS"nn"); DEPARTURE printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=100/-only"tt"Dinner=200/- only"tt"Breakfast=100/-only"nn"); me=per*400; MEALEXPENSE
  • 12. te=(1000*per)+me; TOTALEXPENSE case 'L': case 'l': SERVICE printf("nnttt"YOUR TICKET PRICE IS 1100/-"nn"); PERSONS printf("nnttt"YOUR'S DESTINY DURATION IS 17 HOURS:"nn"); DEPARTURE
  • 13. printf("nnttt"WE WILL SERVE YOU:"Hi-Tea=100/-only"tt"Dinner=200/- only"tt"Breakfast=100/-only"nn"); me=per*400; MEALEXPENSE te=(1100*per)+me; TOTALEXPENSE
  • 14. case 'P': case 'p': SERVICE printf("nnttt"YOUR TICKET PRICE IS 1600/-"nn"); PERSONS printf("nnttt"YOUR'S DESTINY DURATION IS 25 HOURS:"nn"); DEPARTURE printf("nnttt"WE WILL SERVE YOU:Hi-Tea=100/-only"tt"Dinner=200/ only"tt"Breakfast=100/-only"tt"Lunch=200/-only"nn"); me=per*600; MEALEXPENSE te=(1600*per)+me; TOTALEXPENSE