Simple airline seat reservation system in C Programming | Complete source code

Simple airline seat reservation system in C Programming | Complete source code

Simple Airline Seat Reservation System depends on the idea of holding aircraft seats for the travelers. There's no login system accessible for this framework, the client can openly utilize its component.

This small scale venture contains restricted highlights, however the basic one.

Make sure that the you have C programming language editor. So, open the project in the code editor afterwards, and create the project first. After that, run the project.

Simple airline seat reservation system in C Programming  | Complete source code

About Project

Discussing the highlights of this Simple framework, the client needs to choose the seat class whether to pick Business or Economy class. At that point the framework shows accessible seats, and the client needs to enter that specific seat number so as to save it. In the wake of saving a seat, that specific seat won't be accessible any longer for different clients.

The system doesn't make an outside document to store the client's information forever. This system is built using C programming language and various variables, strings used for its creation. Simple Airline Seat Reservation System is free to download in C Programming with source code. Use for educational purposes only! Look at the video below for the Demo project.

Full source code

#include<stdio.h>
#include<math.h> //just put here in case of error
#include<string.h>//i don't know where i use this...
#include<stdlib.h>//same here
int main(void)
{
	int c,p;
	int i;
	int j;
	int s[10]={};
	printf("**Welcome to Simple Airline Seat Reservations System**nn");
	for (j=0; j < 10; j++)
	{
		printf("Choose 1 for First Class and 2 for Economic classt");
		scanf("%i",&c);
		//system("cls");
		switch(c)
		{
		case 1:
			printf("nFirst classn");
			printf("Seats available are 1,2,3,4,5.n");
			do
			{
                printf("Pick a seat:nn");
                scanf("%i",&p);
                s[j]=p;
                //system("cls");
			    for (i=0; i<j; i++)
			    {
                    if (s[j]==s[i])
                    {
                        printf("nnSeat taken.nn");
                        break;
                    }
			    }
            }
            while (i!=j);
                if(s[j] <= 5)
                {
                    printf("n");
                    printf("--------------------------n");
                    printf("Class: First classn");
                    printf("Seat no : %in",s[j]);
                    printf("--------------------------nn");
                }
                else
                printf("nWrong number!  No seat for you!nn");
            break;
		case 2:
			printf("nEconomical classn");
			printf("Seats available are 6,7,8,9,10.n");
			do
			{
                printf("Pick a seat:nn");
                scanf("%i",&p);
                s[j]=p;
                //system("cls");
			    for (i=0; i<j; i++)
			    {
                    if (s[j]==s[i])
                    {
                        printf("nnSeat taken.nn");
                        break;
                    }
			    }
            }
            while (i!=j);
                if(s[j] >= 6)
                {
                    printf("n");
                    printf("--------------------------n");
                    printf("Class: Economical classn");
                    printf("Seat no : %in",s[j]);
                    printf("--------------------------nn");
                }
                else
                printf("nWrong number!  No seat for you!nn");
            break;
        default:
                break;
        }//end switch case
    }//end counting people*/
	return 0;
}

This mini project can definitely help you if you are looking for a reference project or are looking to create your own C mini project. It is absolutely discouraged to apply this project with little or no modification

Leave comment

Comments (1)

// SEARCH

What are you searching for....?

// SUBSCRIBE

Subscribe to us on youtube for updates of our videos first on youtube.

// SUBSCRIBE

To receive updates on the latest news, tutorials and special offers, subscribe to our email newsletter today!

// CATEGORIES

x
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Privacy Policy That's Fine