keep getting error
syntax error before -
#include <stdio.h>
-
#include <stdlib.h>
-
#include <conio.h>
-
-
void PrintMenu(char);
-
int EnterNumber(int ,int );
-
int FindMaximum(int ,int );
-
int FindMinimum(int ,int );
-
int IsEqual(int ,int );
-
-
-
-
int main(int argc, char *argv[])
-
{
-
-
char choice;
-
int number1, number2;
-
while(1){
-
printf("=========================================================\n");
-
printf("* A (a):Enter two integer numbers *\n");
-
printf("* B (b):Find the maximum of the two numbers *\n");
-
printf("* C (c):Find the minimum of the two numbers *\n");
-
printf("* D (d):Determine if both numbers are equal *\n");
-
printf("* Q (q):Quit program *\n");
-
printf("=========================================================\n");
-
printf("\n");
-
-
printf("*Enter Your Chice: ");
-
scanf("%c",&choice);
-
}
-
-
void PrintMenu(char choice)
-
{
-
printf("\nPlease Enter an Integer:");
-
scanf("%d",&number1);
-
printf("\n");
-
printf("\nPlease Enter an Integer:");
-
scanf("%d",&number2);
-
printf("\n You entered %d and %d\n",number1,number2);
-
}
-
-
int EnterNumber(char choice)
-
{
-
if (number2<number1)
-
printf("The Bigger number is %d\n",number1);
-
else if (number1<number2)
-
printf("The Bigger number is %d\n",number2);
-
}
-
-
int FindMaximum(int number1, int number2)
-
{
-
if (number1<number2)
-
printf("The Smaller number is %d\n",number1);
-
else if (number2<number1)
-
printf("The Smaller number is %d\n",number2);
-
}
-
-
-
int FindMinimum(int number1, int number2)
-
{
-
if(number1 == number2)
-
printf("The numbers are equal\n");
-
else if(1)
-
printf("The numbers are NOT Equal\n");
-
}
-
-
-
int IsEqual(int number1, int number2)
-
{
-
if(number1 == 'q'&& number2 == 'q')
-
printf("\n Quitting program!");
-
}
-
-
switch(choice)
-
{
-
case 'a':
-
case 'A': PrintMenu(char choice)
-
break;
-
-
case 'b':
-
case 'B':
-
EnterNumber(char choice)
-
break;
-
-
case 'c':
-
case 'C':
-
FindMaximum(int number1,int number2)
-
break;
-
-
case 'd':
-
case 'D':
-
FindMinimum(int number1,int number2)
-
break;
-
-
case 'q':
-
case 'Q':
-
IsEqual(int number1,int number2)
-
break;
-
}
-
-
-
-
-
1 1687
You are missing some semi-colons in your switch statement. Also this switch appears to be floating outside any function. That won't work: - switch(choice)
-
75. {
-
76. case 'a':
-
77. case 'A': PrintMenu(char choice) <-----!
-
78. break;
-
Then your prototype: - int EnterNumber(int ,int );
doesn't match the code for the function which has a single char argument rather than 2 ints.
There may be other errors. What you try to do is fix only the first error and then rebuild your program. The first error may cause the compiler to find other things wrong that maybe aren't wrong. Eventually by fiing the first error you will get a clean build. Then you can start the actual debugging.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: m3ckon |
last post by:
Hi there,
had to rush some sql and am now going back to it due to a slow db
performance. I have a db for sales leads and have created 3 views based
on the data I need to produce.
However one...
|
by: James Walker |
last post by:
Can some one help I get an error of 'checkIndate' is null or not an object
can someone please help. I can't work out why
Thanks in advance
James
<form>
<td height="24" colspan="7"...
|
by: Kurt Watson |
last post by:
I’m having a different kind of problem with Hotmail when I sign in it
says, "Web Browser Software Limitations
Your Current Software Will Limit Your Ability to Use Hotmail
You are using a web...
|
by: Alan Bashy |
last post by:
Please, guys, In need help with this. It is due in the next week. Please,
help me to implement the functions in this programm especially the first
three constructor. I need them guys. Please, help...
|
by: Steve |
last post by:
Hi,
I've asked this question a couple of times before on this forum but no
one seems to be nice enough to point me to the right direction or help
me out with any information, if possible. Please...
| |
by: KitKat |
last post by:
I need to get this to go to each folders: Cam 1, Cam 2, Cam 4, Cam 6, Cam 7,
and Cam 8. Well it does that but it also needs to change the file name to
the same folder where the file is being...
|
by: Saps |
last post by:
Hi all. Can anyone help me here. I have loads of .sql files and i need
a way to call these from my asp page so the user can run them from the
browser. Meaning i have a page with a list of all...
|
by: CM |
last post by:
Hi,
Could anyone please help me?
I am completing my Master's Degree and need to reproduce a Webpage in
Word.
Aspects of the page are lost and some of the text goes.
I would really appreciate it....
|
by: SKJoy2001 |
last post by:
PLEASE HELP ME!!! P E R L!!!
I have a CGI (PERL) file namely 'test.cgi' and it has the correct permission (755) on the FTP server and it is within the CGI path.
I have the following code in it:...
|
by: jenipriya |
last post by:
Hi all... its very urgent.. please........i m a beginner in oracle.... Anyone please help me wit dese codes i hv tried... and correct the errors...
The table structures i hav
Employee (EmpID,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |