हेलो दोस्तों !
आज की इस Simple parking system project in C programming in Hindi | with source code पोस्ट में हम simple parking system का project C programming की मदद से बनाना सीखेंगे। तो दोस्तों अगर आप इस project को बनाना सीखना चाहते है तो इस पोस्ट को अंत तक जरूर पढ़े।
इस पोस्ट के मुख्य टॉपिक्स निन्म है -
- prking system project overview.
- parking system project source code.
- project source code explanation video.
1.parking system project overview :-
- park_vehicle function.
- check_vehicle function.
- check_insight function
- bus_park function
- car_park function
- bike_park function
- auto_park function
- print_receipt function
main function :-
1.park_vehicle function :-
2.check_vehicle function :-
3.check_insight function :-
4.bus_park function :-
5.car_park function :-
6.bike_park function :-
7.auto_park function :-
8.print_receipt function :-
2.parking system project source code :-
project source code :-
#include < stdio.h >
#include < stdlib.h >
#include < string.h >
int bus_slot = 5, car_slot = 5, bike_slot = 20, auto_slot = 15;
int earings = 0, bus_count = 0, car_count = 0, bike_count = 0, auto_count = 0;
int index1 = 0, index2 = 0, index3 = 0;
struct customer
{
char customerName[10][20], date[10][13];
int vehicleNumber[10];
} c_data;
void print_receipt(int fees)
{
//this function use to print receipt
printf("\nHere you receipt!\n");
printf("***************************************\n");
printf("Name: %s\n", c_data.customerName[index2]);
printf("Vehicle numebr: %d\n", c_data.vehicleNumber[index1]);
printf("Date: %s\n", c_data.date[index3]);
printf("Your name :%d\n", fees);
printf("***************************************\n");
}
void bus_park()
{
//this function use to handle bus parking operations
int fees;
printf("Enter your name: ");
fflush(stdin);
gets(c_data.customerName[index2]);
printf("Enter vehicle number: ");
scanf("%d", &c_data.vehicleNumber[index1]);
printf("Enter today's date: ");
fflush(stdin);
gets(c_data.date[index3]);
repeat:
printf("Please enter fees: ");
scanf("%d", &fees);
if (fees < 200 || fees > 200)
{
printf("Please enter valid amount");
goto repeat;
}
else
{
earings = earings + fees;
printf("Your payment is successfully done\n");
}
print_receipt(fees);
index1++;
index2++;
index3++;
bus_count++;
}
void car_park()
{
//this function use to handle car parking operations
int fees;
printf("Enter your name: ");
fflush(stdin);
gets(c_data.customerName[index2]);
printf("Enter vehicle number: ");
scanf("%d", &c_data.vehicleNumber[index1]);
printf("Enter today's date: ");
fflush(stdin);
gets(c_data.date[index3]);
repeat:
printf("Enter parking fees: ");
scanf("%d", &fees);
if (fees < 150 || fees > 150)
{
printf("Please enter valid amount");
goto repeat;
}
else
{
earings = earings + fees;
printf("Your payment is successfully done\n");
}
print_receipt(fees);
index1++;
index2++;
index3++;
car_count++;
}
void bike_park()
{
//this function use to handle bike parking operations
int fees;
printf("Enter your name: ");
fflush(stdin);
gets(c_data.customerName[index2]);
printf("Enter vehicle number: ");
scanf("%d", &c_data.vehicleNumber[index1]);
printf("Enter today's date: ");
fflush(stdin);
gets(c_data.date[index3]);
repeat:
printf("Enter parking fees: ");
scanf("%d", &fees);
if (fees < 50 || fees > 50)
{
printf("Please enter valid amount");
goto repeat;
}
else
{
earings = earings + fees;
printf("Your payment is successfully done\n");
}
print_receipt(fees);
index1++;
index2++;
index3++;
bike_count++;
}
void auto_park()
{
//this function use to handle auto parking operations
int fees;
printf("Enter your name: ");
fflush(stdin);
gets(c_data.customerName[index2]);
printf("Enter vehicle number: ");
scanf("%d", &c_data.vehicleNumber[index1]);
printf("Enter today's date: ");
fflush(stdin);
gets(c_data.date[index3]);
repeat:
printf("Enter parking fees: ");
scanf("%d", &fees);
if (fees < 100 || fees > 100)
{
printf("Please enter valid amount");
goto repeat;
}
else
{
earings = earings + fees;
printf("Your payment is successfully done\n");
}
print_receipt(fees);
index1++;
index2++;
index3++;
auto_count++;
}
void park_vehicle()
{
//this function use to handle parking operations
int choose;
again:
printf("\n1.Bus 2.Car\n");
printf("3.Bike 4.Auto\n");
printf("Which vehicle you want to park: ");
scanf("%d", &choose);
switch (choose)
{
case 1:
if (bus_slot == 0)
{
printf("\nSorry! Bus parking slot is not available\n");
}
else
{
bus_park();
bus_slot--;
}
break;
case 2:
if (car_slot == 0)
{
printf("\nSorry! Car parking slot is not available\n");
}
else
{
car_park();
car_slot--;
}
break;
case 3:
if (bike_slot == 0)
{
printf("\nSorry! Bike parking slot is not available\n");
}
else
{
bike_park();
bike_slot--;
}
break;
case 4:
if (auto_slot == 0)
{
printf("\nSorry! Auto parking slot is not available\n");
}
else
{
auto_park();
auto_slot--;
}
break;
default:
printf("Invalid number try again\n");
goto again;
}
}
void check_vehicle()
{
//This function use to check your vehicle is available or not
char customerName1[20], date1[13];
int vehicleNumber;
int i = 0, check1, check2, check3;
printf("\nPlease enter some details\n");
printf("Enter Name: ");
fflush(stdin);
gets(customerName1);
printf("Enter vehicle number: ");
scanf("%d", &vehicleNumber);
printf("Enter date: ");
fflush(stdin);
gets(date1);
while (1)
{
check1 = strcmp(customerName1, c_data.customerName[i]);
check3 = strcmp(date1, c_data.date[i]);
if (vehicleNumber == c_data.vehicleNumber[i])
{
check2 = 0;
}
if (check1 == 0 && check2 == 0 && check3 == 0)
{
printf("\nYour vehicle is available here\n");
break;
}
else
{
if (index1 == 9)
{
printf("\nSorry! your vehicle is not available here\n");
break;
}
}
i++;
}
}
void check_insight()
{
//This function use to check parking insight
printf("\n*************Today's insight***************\n");
printf("Total earnings: %d\n", earings);
printf("Total Bus parked: %d\n", bus_count);
printf("Total Car parked: %d\n", car_count);
printf("Total Bike parked: %d\n", bike_count);
printf("Total Auto parked: %d\n", auto_count);
}
void main()
{
//This function use to handle start menu
int choose;
do
{
printf("\n*************Welcome to AKS parking stand**********\n");
printf("This is vehicle fees chart\n");
printf("Bus fees 200 Car fees 150\n");
printf("Bike fees 50 Auto fees 100\n");
printf("\nEnter 1 for park your vehicle\n");
printf("Enter 2 for check your vehicle\n");
printf("Enter 3 for show today insight\n");
printf("Enter 4 for exit\n");
again:
printf("Please choose any option: ");
scanf("%d", &choose);
switch (choose)
{
case 1:
park_vehicle();
break;
case 2:
check_vehicle();
break;
case 3:
check_insight();
break;
case 4:
printf("Thank you for using our parking stand\n");
exit(0);
break;
default:
printf("Invalid number try again\n");
goto again;
break;
}
} while (choose != 4);
}
project output :-
3.project source code explanation video :-
दोस्तों अगर आपको अभी भी इस प्रोजेक्ट का source code समझ नहीं आया है तो आप हमारी यह वीडियो देख सकते है। हमने इस वीडियो में इस प्रोजेक्ट को अच्छी तरह से समझाया है और इस प्रोजेक्ट को रन करके भी दिखाया है। तो अगर आप इस वीडियो को देखना चाहते है तो
इन पोस्ट को भी पढ़ें -
- rock paper scissor game project in c
- simple pacman game project in c
- simple voting system project in c
- word guessing game project in c
Author :- तो दोस्तों अब हमारी यह Simple parking system project in C programming in Hindi | with source code पोस्ट ख़त्म होती है हम आशा करते है की आपको हमारी यह पोस्ट जरूर पसंद आई होगी और आप parking system का project C language की मदद से बनाना सीख गए होंगे। तो दोस्तों आज के लिए बस इतना ही फिर मिलेंगे ऐसी ही किसी और मज़ेदार पोस्ट में तब तक के लिए अलविदा !
0 Comments
Do not enter any spam comments please.