Thread: I can't do the commands

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2020
    Posts
    4

    I can't do the commands

    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;
    }
    Last edited by Patricia F; 11-03-2020 at 05:02 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MS-DOS commands...
    By MipZhaP in forum C++ Programming
    Replies: 9
    Last Post: 08-19-2004, 03:52 AM
  2. DOS Commands
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 05-13-2002, 03:40 AM
  3. commands
    By c++.prog.newbie in forum Windows Programming
    Replies: 1
    Last Post: 02-24-2002, 08:50 PM
  4. DOS Commands
    By Zuul in forum C++ Programming
    Replies: 11
    Last Post: 01-04-2002, 04:41 PM
  5. How to run DOS commands from c++
    By ihsir in forum C++ Programming
    Replies: 2
    Last Post: 12-05-2001, 05:59 AM

Tags for this Thread