Hi!
I'm trying to create a 2-day restaurant program, but I can't get the program to open the table when I press button 1. To give the commands
(1 ° insert table number 2 ° open table) and if the table is occupied, show ": this table is not free. Choose another!"
The free table matrix (item = -1) and whether it is occupied (item = 0).
Code:#include <stdio.h>#include <conio.h> int main () { internal item [8] [5], i, j; int table, op,vacancy float value [8] [5]; cash float = 0; char err = 0; printf ("\ n"); { printf ("| * -------------------- Welcome to the restaurant! ------------------- - * | \ n "); printf ("\ n"); { printf ("[1] Open table \ n"); printf ("[2] Launch expense \ n"); printf ("[3] Close the table account \ n"); printf ("[4] Check the Cashier \ n"); printf ("[0] Exit \ n"); printf ("\ n Choose an option:"); scanf ("% d", & op); } printf ("Enter the table number:"); scanf ("% d"); } return 0; }