Here is all my code so far. And it tells me syntax error before ')' token on line 87.
Code:
#include <stdio.h>
//***************************
//***************************
void DisplayMenu();
void Count10();
void Countby2();
void CountDown();
void Inputcountup();
int main()
{
void DisplayMenu();
int menu;
do
{
DisplayMenu();
printf ("Enter the number of the operatrion you would like to perform: ");
scanf ("%d", &menu);
switch (menu)
{
case 1 : Count10(); break;
case 2 : Countby2(); break;
case 3 : CountDown(); break;
case 4 : Inputcountup(); break;
case 5 : printf ("Quitting the Program"); break;
default : printf ("Invalid Input\n\n"); break;
}
}
while (menu != 4);
return 0;
}
//**************************************
//**************************************
void DisplayMenu()
{
printf ("1. Count to 10\n");
printf ("2. Count to 100 by 2\n");
printf ("3. Countdown from 10\n");
printf ("4. Input Count up\n");
printf ("5. Exit\n");
}
//**************************************
//**************************************
void Count10()
{
int i;
for(i=1;i<=10;i++)
{
printf ("%d\n", i);
}
}
//*************************************
//*************************************
void Countby2()
{
int i=0;
while (i<=100)
{
printf ("%d\n", i);
i+=2;
}
}
//***********************************
//***********************************
void CountDown()
{
int f;
for(f=10;f>0;f--)
{
printf ("%d\n", f);
}
}
//***********************************
//***********************************
void Inputcountup()
{
int p;
int g;
Printf ("Enter a number to count up to: ");
scanf ("%d", &p);
for(g=1;g<=p;g++)
{
printf ("%d\n", g);
}
}
}