Report PSP
Report PSP
Header Files
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
4. Booking a Ticket
void book_ticket() {
printf("\nSelect Bus:\n");
for (int i = 0; i < TOTAL_BUSES; i++) {
int hours = 6 + (i * 1.5);
int minutes = (hours % 2) * 30;
hours = hours / 2 * 2;
printf("%d. Bus %d - Departure Time: %02d:%02d\n", i + 1, i + 1,
hours, minutes);
}
char seat_label[10];
sprintf(seat_label, "%c-%d", get_seat_type(seat_number),
seat_number);
5. Main Function
int main() {
printf("\n Welcome to Bus Booking System \n");
book_ticket();
return 0;
}
The motivation behind this project stems from the common difficulties in
traditional bus booking methods, where passengers often face seat
mismanagement, overbooking issues, and lack of transparency in seat selection.
By automating this process, the system ensures that every booking is accurate,
real-time, and user-friendly.