hello. i make a program for bus ticket reservation and i want to put a seat number in there. so if want to loop the program, and if i pick the same seat number, the program will tell me the seat is taken. is it possible to save information before looping the program?

Recommended Answers

All 2 Replies

what's big deal? Save the data either in file or database..

hello. i make a program for bus ticket reservation and i want to put a seat number in there. so if want to loop the program, and if i pick the same seat number, the program will tell me the seat is taken. is it possible to save information before looping the program?

Of course. Have a 2D array of seats with all zeroes. When a seat is chosen, put a 1 in that array position that corresponds to that seat.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.