Professional Documents
Culture Documents
Sherwin R. Soriano Emil Noeh Gumabon Bsit-2B
Sherwin R. Soriano Emil Noeh Gumabon Bsit-2B
Sherwin R. Soriano Emil Noeh Gumabon Bsit-2B
Soriano
BSIT-2B
BODY:
• C Program
- ticket = to know how many ticket did you get and how much the ticket do you have
INTRODUCTION:
• Ojectives
- this program is created for booking for 3 countries with 10 person the fare minimum is 1000 and
maximum is 5000.
PROGRAM:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void header()
void option1()
void option2()
void option3()
int choice()
struct flight{
int ticket;
};
int main() {
float total;
char repeat;
printf("\nEnter username: ");
scanf("%s", &user);
scanf("%s", &pw);
printf("\nWelcome");
scanf("\n%d", &trip);
printf("\nDate: ");
printf("\n1. Nov 1, 2019 \n2. Nov 2, 2019 \n3. Nov 3, 2019(not applicable for round trip)\n");
scanf("%d", &date);
switch (trip)
case 1:
if (date==1)
printf("\nNov 1, 2019\n");
option1();
scanf("%d", &x);
scanf("%d", &book[a].ticket);
}
else if (date==2)
printf("\nNov 2, 2019\n");
option2();
scanf("%d", &x);
break;
break;
default:
break;
printf("\n");
printf("\nSummary: ");
else
{
printf("\nInvalid login");
return 0;
Refference:https://www.daniweb.com/programming/software-development/threads/509427/flight-
reservation-in-c-program