0% found this document useful (0 votes)
74 views18 pages

C Project On "Hotel Management": June 2020

This document summarizes a hotel management project created by four authors from Tribhuvan University in Nepal. The project consists of modules for user registration, room booking, activities selection, and billing. It aims to simplify hotel operations like reservations, billing, and maintaining guest data. The source code in C programming language is included, with functions for a home page, booking rooms, selecting programs, and viewing details.

Uploaded by

Rakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views18 pages

C Project On "Hotel Management": June 2020

This document summarizes a hotel management project created by four authors from Tribhuvan University in Nepal. The project consists of modules for user registration, room booking, activities selection, and billing. It aims to simplify hotel operations like reservations, billing, and maintaining guest data. The source code in C programming language is included, with functions for a home page, booking rooms, selecting programs, and viewing details.

Uploaded by

Rakesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/342335724

C Project on "Hotel Management"

Presentation · June 2020


DOI: 10.13140/RG.2.2.25306.77763

CITATIONS READS
0 2,293

4 authors, including:

Utsav Poudel Sujal Koirala


Tribhuvan University Tribhuvan University
8 PUBLICATIONS   1 CITATION    2 PUBLICATIONS   0 CITATIONS   

SEE PROFILE SEE PROFILE

Suman Poudel
Tribhuvan University
2 PUBLICATIONS   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Optimization View project

AutoCAD View project

All content following this page was uploaded by Utsav Poudel on 20 June 2020.

The user has requested enhancement of the downloaded file.


IOE PULCHOWK CAMPUS

A Mini project on
“Hotel Management”

By: Utsav Poudel


Sujal Koirala
Sushil Pandey
Suman Poudel
This “Hotel Management “project is useful tool for
the related industries that can be used in hotels, resorts,
lodgings, motels, farms and suites. It consists of all
necessary capabilities in Inn control software. It
emphasizes best stage of services for character visitors
through our full capabilities that integrate rooms,
restaurants and retail stores with records contained in
book reserves. This project cover the modules like User
details, Registration, Activities, and finally billing and
Payment element with check in, check out facts.

Our Hotel Management program is an all-


inclusive system which simplifies the end to end of
hotel operations such as front office, room
reservations refreshments, billing, and more by
automating them. It helps in improving efficiency
and fast procedures for visitors. It is also efficient in
keeping guest database and preferences.
This program is untroublesome as it will serve
the user to be updated about records without any
strength and it is favored much by people involved
in the business sector.

1. All proper keywords has been used to define is


function this new system.
2. Basic concepts of C programming language like
goto, structures, array and files are used.
3. User will be able to get all details on how to use
instruction on offline mode, so no need to take
special training before using the system.

4. It allows Hotel reception department to manage


all the records of their customers and their
payment in easy manner.
5. It meets all the dealing out requests needed
within hotel industries.

As we are aware of busy and hectic schedule of


business people, this Hotel Management program
will surely turn out to be great relief for them. This
program definitely has a wide scope to minimize
errors in handling database of customers and in
making the bills.
In short, this program is rooted on C. In the
making of this program, reliability is put into
consideration which focuses to sell once quality time.
It has least chance of data loss and we don’t have to
worry about it being damaged.
1. www.codewithc.com
2. www.lovelycoding.org
3. Griffiths David , Head First C, 2012
4. Shaw Zed, Learn C By Hard Way, 2015
5. Kanetkar Yashavant , Let Us C , 1999.

Source Code
#include<stdio.h> /*header files*/

#include<conio.h>

#include<string.h>

#include<time.h>

#include<stdlib.h>

void begin(); /*function declarations*/

void program();

void show_details();

void complaints_suggestions();

void book_room();

void mini_casino();

void GuessGame();
struct { /*structure that stores details of persons*/

char name[20];

char address[50];

char email_id[30];

char nationality[25];

int roomno;

char *roomtype;

int billprice;

char *program;

}person;

int main(){

person.roomno =0;

person.billprice =0;

person.program = "notchosen";

printf(".............WELCOME TO GHUMTEE RIVIERA RESTAURANT AND LODGE..............\n");

printf("Please enter your details before moving to the main page!\n");

printf("please enter your name:");

gets(person.name);

printf("enter your address:");

gets(person.address);

printf("enter your nationality:");

gets(person.nationality);

printf("enter your email_id:");

gets(person.email_id);
system("cls");

time_t timer = time(NULL);/*to get the present local time*/

begin();

return 0;

void begin(void){

int decide;

printf("\n-----------------------HOME PAGE--------------------------\n");

printf("\n HOW CAN WE HELP YOU?\n\n");

printf("\n1.Book a room\n2.Program\n3.mini casino\n4.show my details\n5.complaints or


suggestions\n6.check out\n7.about us\n");

scanf("%d",&decide);

switch(decide)

case 1:

book_room();

break;

case 2:

program();

break;

case 3:

mini_casino();

break;

case 4:

show_details();

break;
case 5:

complaints_suggestions();

printf("Thank you for your valuable suggestions!\n");

begin();

break;

case 6:

printf("Visit again!");

printf("Thank you for trusting our service.\n");

break;

case 7:

printf("GHUMTEE RIVERA RESORT:\n");

printf(" A beautiful cosmopolitan destination for a picturesque natural scenario, a blend of Natural
and Artificial effort located on the border of");

printf("Chitwan National park (A UNESCO World Heritage Site) allows you to enjoy the breeze of
Rapti River flowing through the lap of Chitwan National Park.");

printf("Enjoying the spectacular sunset and its reflection on Rapti River along with grazing of deer
on the bank by relaxing on our rugged cottages");

printf("is the memorable experience you could enjoy only at GHUMTEE RIVERA RESORT. \n");

printf("We would be more than happy to experience you Jungle Safari, canoe ride to Crocodile
Breeding Farm and Ox-Cart ride.");

printf("Clean and Comfortable room, Hot and Cold Water facilities, beautiful garden, family
environment, local food are our salient features to give you taste of our Nepalese Culture.");

printf("Satisfying you totally with our unique culture is our primary motto.\n");

begin();

break;

}
void book_room(void){

system("cls");

if(person.roomno == 0){

int type_of_rooms;

char ch,c;

printf("\nWhat type of room do u want to book?\n");

printf("\n1.Basic Room Rs 1000\n2.Medium room Rs 2000\n3.DELUXE ROOM Rs 3000\n4.I don't


want to choose anything\n");

scanf("%d",&type_of_rooms);

fflush(stdin);

if(type_of_rooms==1){

printf("\nDo you accept this room?(y/n)\n");

fflush(stdin);

scanf("%c",&c);

if (c=='y'){

system("cls");

printf("\nYou choose basic room. Enjoy your stay\n");

printf("your room no is 121");

person.roomno = 121;

person.roomtype = "basic";

person.billprice += 1000;

begin();

else

begin();
}

if(type_of_rooms==2){

printf("\nDo you accept this room?(y/n)\n");

scanf("%c",&c);

if(c=='y'){

system("cls");

printf("\nYou choose medium room. Enjoy your stay\n");

printf("your room no is 212");

person.billprice += 2000;

person.roomno = 212;

person.roomtype = "medium";

begin();}

else

begin();

if(type_of_rooms==3){

printf("\nDo u accept this room?(y/n)\n");

scanf("%c",&c);

if(c=='y'){

system("cls");

printf("\nYou choose deluxe room. Enjoy your stay\n");

printf("your room no is 312");

person.billprice += 3000;

person.roomtype = "deluxe";

person.roomno = 312;
begin();

else

begin();

if(type_of_rooms==4)

begin();

else

printf("you have already booked a room");

void program(void){

system("cls");

int p;

printf("\nWhich program do you want to choose?\n");

printf("\n 1.Jungle Walk \n 2.Jungle Jeep Drive\n 3.Canoe ride \n 4. Cultural show ");

scanf("%d",&p);

switch(p){

case 1:

system("cls");

printf("\nYou choose jungle walk\n");

person.program = "Jungle walk";

person.billprice += 1000;

begin();

break;
case 2:

printf("\nYou choose jungle jeep drive\n");

person.program = "Jeep Drive";

person.billprice += 2000;

begin();

break;

case 3:

printf("\nYou choose canoe ride\n");

person.billprice+= 800;

person.program = "Canoe Ride";

begin();

break;

case 4:

printf("\nYou choose cultural show\n");

person.billprice+= 1000;

person.program = "Cultural show";

begin();

break;

default:

begin();

void show_details(void){

system("cls");

time_t timer = time(NULL);


printf("you can get your details in hotel.txt file\n");

FILE *ifp;

ifp = fopen("hotel.txt","w+");

if(ifp == NULL){

printf("file cant be opened\n");

else{

fprintf(ifp,"........DETAILS......\n");

fprintf(ifp,"Name : %s\n",person.name);

fprintf(ifp,"Nationality : %s\n",person.nationality);

fprintf(ifp,"Email id : %s\n",person.email_id);

fprintf(ifp,"Address : %s\n",person.address);

fprintf(ifp,"Arrival time: %s\n",ctime(&timer));

fprintf(ifp,"Roomno : %d\n",person.roomno);

fprintf(ifp,"Roomtype : %s\n",person.roomtype);

if(strcmp(person.program,"notchosen") != 0){

fprintf(ifp,"Program : %s\n",person.program);

fprintf(ifp,"your bill price is %d\n",person.billprice);

fprintf(ifp,"press p to print your details");

fflush(ifp);

fclose(ifp);

begin();

}
void complaints_suggestions(void){

system("cls");

char complain[500];

FILE *fpt;

if(fpt == NULL){

printf("file cant be opened\n");

printf("please enter your complaints or suggestions");

fflush(stdin);

gets(complain);

fpt = fopen("complain.txt","w+");

fputs(complain,fpt);

fclose(fpt);

void GuessGame(int amount_bet, int* inhand_cash)

char num[3] = { 'N', 'R', 'N' };

printf("\nWait !! number is shuffling its position...\n");

srand((time(NULL)));

int i, x, y, temp;

/*Swapping the number's position five times using

the random number for random index*/

for (i = 0; i < 5; i++) {


x = rand() % 3;

y = rand() % 3;

temp = num[x];

num[x] = num[y];

num[y] = temp;

int PlayerGuess;

printf("\nYou may now guess the number in which R is present: ");

scanf("%d", &PlayerGuess);

if (num[PlayerGuess - 1] == 'R') {

(*inhand_cash) += 2 * amount_bet;

printf("You win ! The numbers are as follows: ");

printf("\"%c %c %c\" ", num[0], num[1], num[2]);

printf("\nYour inhand_cash is now = %d \n", *inhand_cash);

else {

(*inhand_cash) -= amount_bet;

printf("You Loose ! The numbers are as follows: ");

printf("\"%c %c %c\" ", num[0], num[1], num[2]);

printf("\nYour inhand_cash is now = %d \n", *inhand_cash);


}

void mini_casino()

int amount_bet, inhand_cash;

/*

You have to guess the right number among 3 numbers.

The position where right number is is

named as 'R' and rest two are named as 'N'

If your guess is wrong, you loose the

amount_bet from your inhand_cash

If you guess it right, you win

twice the amount_bet in your inhand_cash

Keep playing and keep winning

until you go out of cash

*/

printf("\n////////-WELCOME TO MINI CASINO-\\\\\\\\\\\\ \n");

printf("\n----Enter the inhand_cash you have right now---- :\n ");

scanf("%d", &inhand_cash);

while (inhand_cash > 0) {

printf("\nEnter the amount_bet you want to play for : \n");

scanf("%d", &amount_bet);

if (inhand_cash == 0 || amount_bet > inhand_cash)


break;

else

GuessGame(amount_bet, &inhand_cash);

if (inhand_cash == 0 || amount_bet > inhand_cash) {

printf("\n\""

" \nSorry you don't have enough cash to play more,\n ");

printf("\nDo come next time\""

"\n\n");

printf("\nThank You for playing \n");}

View publication stats

You might also like