clubgamma / Ticket-Booking

Participate in Club Gamma Hacktoberfest by contributing to any Club Gamma Project
https://clubgamma.vercel.app/
1 stars 10 forks source link

Display Price Based on Destination Instead of User Input #13

Closed vasu-CE closed 1 month ago

vasu-CE commented 1 month ago

In this segment of the ticket booking system, I've implemented the functionality to retrieve and display ticket prices based on the selected destination city.

first i created ticketPrices: An integer array corresponding to the ticket prices for each city in indianCities

Function Implementation: Developed a function named getPriceForCity -> The function iterates through the indianCities array, comparing the input city with each entry. If a match is found, it returns the corresponding price from the ticketPrices array. If the city is not found, it returns -1 to indicate an error.

soni-shashan commented 1 month ago

@vasu-CE mention the issue in comment always something like closes #issue-number or fixes #issue-number, which will automatically close the issue ex: fixes #40 : display price based on destination

soni-shashan commented 1 month ago

fixes #10 : Display Price Based on Destination Instead of User Input