Click here to Skip to main content
15,917,709 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
David Crow20-Nov-20 3:02
David Crow20-Nov-20 3:02 
PraiseRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
Randor 21-Nov-20 20:46
professional Randor 21-Nov-20 20:46 
QuestionRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
Richard MacCutchan20-Nov-20 4:18
mveRichard MacCutchan20-Nov-20 4:18 
AnswerRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
samtoad20-Nov-20 13:22
samtoad20-Nov-20 13:22 
QuestionRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
David Crow20-Nov-20 16:36
David Crow20-Nov-20 16:36 
GeneralRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
Dave Kreskowiak20-Nov-20 17:17
mveDave Kreskowiak20-Nov-20 17:17 
GeneralRe: A "C" programming equivalent to Windows + R run dialog invokcation Pin
Randor 21-Nov-20 21:06
professional Randor 21-Nov-20 21:06 
QuestionBeginner problem c++ Pin
begzz17-Nov-20 11:02
begzz17-Nov-20 11:02 
QuestionRe: Beginner problem c++ Pin
David Crow17-Nov-20 14:49
David Crow17-Nov-20 14:49 
SuggestionRe: Beginner problem c++ Pin
Richard MacCutchan17-Nov-20 21:11
mveRichard MacCutchan17-Nov-20 21:11 
QuestionSetting Up Visual Studio Code & MinGW Pin
Member 1499476816-Nov-20 17:06
Member 1499476816-Nov-20 17:06 
AnswerRe: Setting Up Visual Studio Code & MinGW Pin
Richard MacCutchan16-Nov-20 21:42
mveRichard MacCutchan16-Nov-20 21:42 
AnswerRe: Setting Up Visual Studio Code & MinGW Pin
Dave Kreskowiak17-Nov-20 8:37
mveDave Kreskowiak17-Nov-20 8:37 
QuestionPrime Number Code C Pin
iHuy14-Nov-20 22:06
iHuy14-Nov-20 22:06 
AnswerRe: Prime Number Code C Pin
_Flaviu14-Nov-20 23:30
_Flaviu14-Nov-20 23:30 
QuestionRe: Prime Number Code C Pin
David Crow15-Nov-20 4:21
David Crow15-Nov-20 4:21 
QuestionC++ compiler that supports multiple inheritance Pin
Member 1274166010-Nov-20 1:26
Member 1274166010-Nov-20 1:26 
AnswerRe: C++ compiler that supports multiple inheritance Pin
Mircea Neacsu10-Nov-20 1:30
Mircea Neacsu10-Nov-20 1:30 
AnswerRe: C++ compiler that supports multiple inheritance Pin
CPallini10-Nov-20 2:13
mveCPallini10-Nov-20 2:13 
GeneralRe: C++ compiler that supports multiple inheritance Pin
Member 1274166017-Jul-23 20:19
Member 1274166017-Jul-23 20:19 
QuestionI can't compile and put it as a variable and matrix Pin
Member 149848945-Nov-20 5:45
Member 149848945-Nov-20 5:45 
Hi!
I cannot compile this program.
Please help me because I have no idea how I do it, my teacher spent this activity and I found it very difficult.

After completing an option, the program must return to the initial menu until "0" is pressed.

C++
<pre>
#include <stdio.h>
#include <conio.h>

int main()
{
system("CLS");
int item [8][5]; // matrix that will store how many items have been released
int op,vaga,i,j;
float value[8][5]; //matrix that will store the total value
float box = 0; /// variable that will store the value of the box

printf("\n");
	printf ("|*--------------------Welcome to the restaurant! -------------------- *|\n");
printf("\n");

				//Menu
printf(" [1] Open table\n");
printf(" [2] Launch expense\n");
printf(" [3] Close table account\n");
printf(" [4] Check Cashier\n");    
printf(" [0] Exit\n");
printf("\n Choose an option:");
scanf ("%d",&op);
switch (op)
	  // should receive only one character which are the (1,2,3,4,0) without the need to prefix the enter any other number should be disregarded.
	    {
	    case 0: 
		    printf("Leaving the Program");
		   break;
case 1: 
printf ("Enter table number:");
scanf("%d");
if (item>=-1) printf("%d table open");
else if (item<= 0)
printf("Error that table is not free. Choose another table!");
		    function_open_table();
		    break;
	    case 2:
		    printf("Value launched on table");
		    printf("Placement amount: %d");
		    scanf("%d");
		    printf("Total value of the table:R$ ");
		    scanf("%f");
		    if (table>=-0) printf("%d table open");
else if (table<= -1)
printf("Error that table is not open!");
		    	 function_Launch_dispatch();
		    break;
	    case 3:
	    	printf("The table has just been closed");
                                                    // the total value of the table and the amount of posted items that are in (case 2) appear
		   break;
	    case 4: 
            printf("The total value in the box: R$%.2f");
                                                             // the total value of the box of all the tables
		    break;
	    default:
		    printf("option invalidates!");
	    }
	return 0;	
}

AnswerRe: I can't compile and put it as a variable and matrix Pin
Victor Nijegorodov5-Nov-20 6:58
Victor Nijegorodov5-Nov-20 6:58 
AnswerRe: I can't compile and put it as a variable and matrix Pin
jeron15-Nov-20 7:17
jeron15-Nov-20 7:17 
AnswerRe: I can't compile and put it as a variable and matrix Pin
Member 149848945-Nov-20 11:57
Member 149848945-Nov-20 11:57 
GeneralRe: I can't compile and put it as a variable and matrix Pin
jeron15-Nov-20 12:29
jeron15-Nov-20 12:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.